Hello,
thanks for your help.
The joins Building.condition and Building.care_level are pointing the same
table. The table is a single-inheritance construct.
The query:
session.query(Building).join(rating, Building.condition).join(care_level,
Building.care_level)
produces this error:
sqlalchemy.exc.ArgumentError: Can't determine join between 'building' and
'%(34604496 lookup)s'; tables have more than one foreign key constraint
relationship between them. Please specify the 'onclause' of this join
explicitly.
This error can be fixed via string property names:
session.query(Building).join('care_level').join('rating')
This works, but with this method i have no alias names.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/Z-JEIbJEInkJ.
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.