Re: [SQLObject] Intermediate table in RelatedJoins
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Neil M. <drn...@gm...> - 2009-08-12 11:27:33
|
On Wed, Aug 12, 2009 at 12:55 PM, Miguel Tavares<mig...@gm...> wrote: > Example: > > ###################################################### > import sqlobject > > class A (sqlobject.SQLObject): > name = sqlobject.StringCol (unique=True) > > class B (sqlobject.SQLObject): > name = sqlobject.StringCol (unique=True) > a = sqlobject.RelatedJoin ('A') > There isn't a corresponding RelatedJoin definition in class A - since RelatedJoin is intended to express a Many-to-Many relationship, and this class structure is one-to-many (B can point to many A's, but A is unable to point to any B's), that sqlobject doesn't figure out what you expect it to do here is not that surprising. It may be worthwhile trying to improve the checks on RelatedJoin to warn about this case. -- Neil Muller drn...@gm... I've got a gmail account. Why haven't I become cool? |