guynir42 / AstroRetriever

A package used for downloading and processing images from various astronomical surveys
Other
4 stars 2 forks source link

cascades of lightcurves #71

Closed guynir42 closed 1 year ago

guynir42 commented 1 year ago

We should consider adding back the save-update cascade for Lightcurve->Source

The other way around is a no-go, because we want to have source+lightcurves without saving those lightcurves (you can add them to the session explicitly if you like). But the other way around is different: you cannot have a lightcurve in the DB without a source_id (that is a foreign key constraint) so maybe it is ok to automatically draw in the Source into the session whenever a Lightcurve is added.

This does not apply to RawPhotometry since that can have multiple sources (from different projects) so it is ok.