Hi there,

How can I construct a GAE query using the DAL which allows me to
specify the __key__?

I can see several references to this in the dal.py file. Also in the
following post:

http://groups.google.com/group/web2py/browse_thread/thread/2ed53b5dc9069bef/785854e3ff3aa40b?lnk=gst&q=ANCESTOR#785854e3ff3aa40b

I need to do something like:

    key = Key.from_path('address', addressId,
parent=Key.from_path('user', userId))   <--- need to be able to set
the parent!!!!

    address = db.address(db.address.key == str(key)) or something to
this effect.

I know I can access the internal GAE model like

   address = db.address._tableobj.get_by_id(id,
parent=Key.from_path('user', userId))

   or

   address = gae,get(key)

But then I've stepped _outside_ of web2py and alot of the useful
functionality provided by web2py is unusable.

Thanks in advance,
Matt

PS: Alternatively is there a way of re-wrapping these GAE models back
up into a Row?

Reply via email to