Hi Kenneth, Thanks a lot for getting back. Actualy, to my understanding, the 'list:reference' provides a way to bypass the third table, and most importantly the joins that don't work on GAE. A list of records is represented as a string with the ids separated by '¦'. E.g. in my example, the groupusers should have been '1¦2' (or '¦1¦2¦', I'm not sure).
That said, the update issue remains -- or do you have a hint? BR, Andre On 12 jan, 22:35, Kenneth Lundström <[email protected]> wrote: > I might be completly wrong but shouldn t it be like this: > > db.define_table('person', Field('name'), Field('groupe', > 'list:reference groupe')) > db.define_table('groupe',Field('groupname')) > > db.groupe(db.person.id<3).update(groupe=1) > > If one users can be in many groups you get a many-to-many relationship > and you need a third table to now to what group a user belongs. > > Kenneth > > > I'm trying to update a 'list:reference' field programaticaly, but this > > doesn't work so far. > > > Say I have this model: > > > db.define_table('person', Field('name')) > > db.define_table('groupe',Field('groupname'), Field('groupusers', > > 'list:reference person')) > > > assume I have already entered three persons, with ids 1,2,3 and, also > > defined a group with id=1 > > > Then > > db.groupe(db.groupe.id==1).update(groupusers=[1,2]) > > > doesn't change the record. Does someone see what I'm doing wrong? > > > Thanks in advance for any cue on this. > > > Andre > >

