Re: [SQLObject] MultipleJoin confusion
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Frank B. <fb...@fo...> - 2003-11-09 23:33:13
|
Hallo, John Baker hat gesagt: // John Baker wrote: > class Story (SQLObject): > _connection = getConnection() > > storyId = StringCol() > authorContact = ForeignKey("Contact") > date = IntCol() > title = StringCol() > summary = StringCol() > body = StringCol() > replies = MultipleJoin('Reply') > > > and > > > class Reply (SQLObject): > _connection = getConnection() > > replyId = StringCol() > author = StringCol() > email = StringCol() > date = IntCol() > body = StringCol() > story = ForeignKey("Story") > > > yet I can't call addReply to an instance of Story: > > File "./db.py", line 406, in buildDatabase > s.addReply(r) > AttributeError: 'Story' object has no attribute 'addReply' > > Any thoughts? I didn't look it up, but it might be, that SQLObject has a problem with the plurals in words ending in "y". What happens if you use, for example, "comment" and "comments" here? ciao -- Frank Barknecht _ ______footils.org__ |