Autoloading and foreign key detection are problematic on some DB engines (I
think SQlite falls in this category as it doesn't directly support FKs), on
other engines they are simply hard to detect.
I would think that your override of the FK in the t_incident table should be
all that's needed to pick up the relationship, but for a workaround you can
spell out the columns, as you've seen, or if the relationships are your only
issue, you can specify the join keys in the relationship itself:
mapper(Incident, t_incident, properties={
'entries': relation(Entry, backref="incident", primaryjoin =
t_entry.c.orr_id == t_incident.c.orr_id),
})
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---