[SQLObject] Quesiton about multiple Joins
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Cary F. <ckf...@ho...> - 2004-06-15 14:53:11
|
Hey all, I'm using SQLObject 0.5 with SQLite and had a problem with multiple joins. The relevant code is: class Users(SQLObject): _connection = conn name = StringCol(default=None) email = StringCol(default=None) password = StringCol() username = StringCol(alternateID=True) lastLogin = DateTimeCol(default=None) user_type = IntCol(default=None) projects = MultipleJoin('Projects') AND: class Projects(SQLObject): _connection = conn state = IntCol() number = IntCol(alternateID=True) creator = ForeignKey('Users') client = ForeignKey('Clients',notNone=True) As far as I could tell in the documentation to connect these two tables, I just say: Projects.add(blah blah, creator=Users(1)) and then for a in Users(1).projects: print a should give me something, but it just says that there is no users_id in the projects table. I am guessing that there is some flag I am not setting or something I'm not doing that would make that flag get added. Any suggestions? _________________________________________________________________ Get fast, reliable Internet access with MSN 9 Dial-up now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ |