[web2py] GAE, parents, and row objects.

9 views
Skip to first unread message

Matt

unread,
Apr 18, 2010, 8:30:33 PM4/18/10
to web2py-users
Hi,

Quick question when using web2py with GAE.

I need to assign a model as the parent of another entity.

How can I retrieve the GAE "model instance" from a web2py query...?

book = db.book[request.args(0)]

[The book is returned as a row]

I'd like to do the following:

db.review.insert(parent = book, text = 'The book was great)

Is there an easy way to do this?

Thanks in advance,
Matt


--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

mdipierro

unread,
Apr 18, 2010, 9:53:55 PM4/18/10
to web2py-users
No but there should. Will look into this. If anybody has come concrete
proposals, let me know.

Massimo

Matt

unread,
Apr 19, 2010, 12:15:36 AM4/19/10
to web2py-users
Thanks Massimo.

Matt

howesc

unread,
Apr 20, 2010, 2:07:26 PM4/20/10
to web2py-users
is parent a GAE thing?

if not, then wouldn't parent be setup as a reference to book (in this
example), and
db.review.insert(parent = book.id, text = 'The book was great) would
work?

cfh

Matt

unread,
Apr 24, 2010, 6:44:50 PM4/24/10
to web2py-users
Yes it is.

I'm happy to raise a feature request for this.

Matt

On Apr 21, 6:07 am, howesc <how...@umich.edu> wrote:
> isparentaGAEthing?
>
> if not, then wouldn'tparentbe setup as a reference to book (in this
> example), and
> db.review.insert(parent= book.id, text = 'The book was great) would
> work?
>
> cfh
>
> On Apr 18, 9:15 pm, Matt <mjwat...@gmail.com> wrote:
>
>
>
> > Thanks Massimo.
>
> > Matt
>
> > On Apr 19, 1:53 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > No but there should. Will look into this. If anybody has come concrete
> > > proposals, let me know.
>
> > > Massimo
>
> > > On Apr 18, 7:30 pm, Matt <mjwat...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > Quick question when using web2py withGAE.
>
> > > > I need to assign a model as theparentof another entity.
>
> > > > How can I retrieve theGAE"model instance" from a web2py query...?
>
> > > >       book = db.book[request.args(0)]
>
> > > >       [The book is returned as a row]
>
> > > >       I'd like to do the following:
>
> > > >       db.review.insert(parent= book, text = 'The book was great)

Matt

unread,
May 24, 2010, 6:32:54 PM5/24/10
to web2py-users
Does web2py have a feature/request tracking system....?

I'm really keen to see this added - if possible - as it's a core part
of GAE.

Matt

Yarko Tymciurak

unread,
May 24, 2010, 9:53:04 PM5/24/10
to web2py-users

On May 24, 5:32 pm, Matt <mjwat...@gmail.com> wrote:
> Does web2py have a feature/request tracking system....?

Technically, google code has bugtracking;

Practically, Massimo's always just answered questions here, and made
updates from posts here.
In the past, trying to do _both_ for web2py just turned out to be
extra work, no real extra benefit (at this point).

- Yarko
Reply all
Reply to author
Forward
0 new messages