"secondary" is never implied in relationship(), you must always specify this 
table explicitly.

Also I'd advise caution when mapping to a "secondary" table - SQLAlchemy may 
perform persistence operations twice against it, unless the relationship is set 
as viewonly=True.


On May 17, 2012, at 12:14 PM, Demitri Muna wrote:

> Hi,
> 
> As a quick follow up, the inability to cross schema in one direction means 
> that join tables won't work regardless of path order. For example, given
> 
> apogeedb.Calibration
> platedb.Exposure
> 
> neither of these will work since, I'm guessing, the join must be made in both 
> directions:
> 
> Calibration.exposures = relation(Exposure, backref="calibrations")
> Exposure.calibrations = relation(Calibration, backref="exposures")
> 
> Again, the schema arg is explicitly set. This does work:
> 
> Calibration.exposures = relation(Exposure, 
> secondary=ExposureToCalibration.__table__, backref="calibrations")
> 
> 
> Cheers,
> Demitri
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to