Just tried that, and all that does is return a comma separated list of
the course titles - a bit closer but I need the objects really as I
want to access other properties of them.

I'm beginning to think that either I don't understand GAE enough or
it's not useful for the app I'm developing (which would be a shame, as
I really like the idea of hassle-free deployment and scaleability)

Dave


On Aug 20, 11:42 pm, Anthony <abasta...@gmail.com> wrote:
> Does db.person.courses.represent(person.coures) work? 
> Seehttp://web2py.com/book/default/chapter/06#Many-to-Many,-list:<type>,-and-contains
> .
>
> Anthony
>
>
>
>
>
>
>
> On Saturday, August 20, 2011 1:58:04 PM UTC-4, fishwebby wrote:
> > Hi, I'm trying to do something quite straightforward but can't seem to
> > work out how to do it: for a list:reference field, get all the items
> > in the reference field (not just their IDs).
>
> > For example, a person with many courses:
>
> > db.define_table('course', Field('title'))
>
> > db.define_table('person',
> >   Field('name'),
> >   Field('courses', 'list:reference course'))
>
> > First I'm finding a person by ID:
>
> > person = db(db.person.id==id).select().first()
>
> > Then I want to get a list of courses - "person.courses" just returns a
> > list of IDs. I could use "belongs" with those IDs but I believe that
> > has a limit of 30 on GAE so I can't use that.
>
> > Is there some way of selecting the objects in the reference, something
> > like
>
> > db(person.courses).select() ?

Reply via email to