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.
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.