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