You can do things like

db.define_table('person',Field('name'),
Field('friends',gae.ListProperty(int),readable=False,writable=False))

now you can do:

tim=db.person.insert(name='Tim',friends=[])
kim=db.person.insert(name='Kim',friends=[tim])

friends_of_tim=db(db.person.friends==tim).select()

Mind that this would only work on GAE and the "friends" field would
not show up in forms.



On Jan 4, 9:57 pm, yamandu <yamandu.co...@gmail.com> wrote:
> Google people recommend to use list properties to do many to many
> relationships.
> Since now, all GAE types are supported, I ask:
> Is or will be this supported in web2py? Or one must code it manually?
> Someone has a tip to design relationships in web2py on gae?
>
> I´ve been coding in web2py on GAE but sometimes things get hard and I
> have spend more time thinking a new way to do old things.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to