bug of elixir's OneToOne and TG2

3 views
Skip to first unread message

Victor

unread,
Jul 3, 2009, 9:38:17 AM7/3/09
to TurboGears
I apply the elixir patch into my TG2, and create tg2 application.
Everything seems works fine, except the OneToOne relation of elixir.

I got a "AttributeError: 'Query' object has no attribute 'mapper'"
error when I modify a Entity that have an OneToOne relation with
Catwalk.

For example:

class User(Entity):
# omit..
site = OneToOne('Site', inverse='user')

class Site(Entity):
using_options(tablename='Site')

user = ManyToOne('User', colname='user_id', primary_key=True,
ondelete='cascade')
title = Field(Unicode(16), primary_key=True)

like this, there is an OneToOne relation in User, if I edit the user
who do have a one to one record(One site here), then here comes the
bug.

Victor Lin

unread,
Jul 3, 2009, 9:46:51 AM7/3/09
to TurboGears
Reply all
Reply to author
Forward
0 new messages