On Apr 24, 2012, at 4:42 PM, David Bowser wrote:

> 
> The table tg_user only contains the authentication/access data for the user, 
> and is queried extremely frequently. The table user_profile contains, well 
> everything else in the profile that isn't needed very often.  For any user 
> with user_id n, that user's user_profile id is also n.
> 
> Easy Fix though once you pointed out that was the problem.
> 
> Dropped the second relationship, and used joined table inheritance without a 
> discriminator, and the orm is now happy.
> 
> Still confused about how it ended getting a uselist=False on the backref for 
> that tho.

one-to-many is defined as parent->child where child has a foreign key column 
referring to parent; many-to-one is the reverse, where parent has a foreign key 
that refers to child.  When you tell the ORM "foreign_keys = 
[some_col_on_parent]", that tells SQLA that the parent refers to the child, 
hence many-to-one, hence uselist is set to False.

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