Hi Christian, Thanks for your response.
In order to save my entities (as part of an entity group) I've had to set the parent of the 'address' to be the 'user'. That way I can use a transaction to persist these multiple entities in one go. I.e. assuming: db.define_table('user', db.Field('name', 'string')) db.define_table('address', db.Field('street', 'string')) In my code (more or less): from google.appengine.ext import db as gae def txn(name, street): user = db.user._tableobj(name=name) address = db.address._tableobj(parent=user, street=street) user.put() address.put() gae.run_in_transaction(txn, name='Barry', street='Whatever') Now since I've used a parent for the address I can't do queries using the DAL like: address = db.address(addressId) or address = db.address(db.address.id == addressId) etc. As it always returns None as the "key" for this entity is now composed of itself plus it's parent. Which I have no way to specify. So hence I have to step outside of web2py to retrieve records using raw GQL calls and means that I lose nice web2py features like: Inside my html: {{= address.user.name }} Does that make sense? Ideally I'd like to be able to construct the key and compare it like any other field. Perhaps a custom GAE method to support this could be added to the core? Cheers, Matt On Jan 11, 12:55 pm, howesc <how...@umich.edu> wrote: > I must admit i'm not following your example. why do you need to query by > GAE __key__ rather than by ID? (i have not used ancestors in GAE so maybe > that is why i'm mis-understanding). > > but your reference to my previous exchange made me look at this in the new > DAL - and the !=, <, >, <=, and >= queries are broken again on GAE. I'll > work on putting a patch together for that since i did it before. if you > help me understand your problem better perhaps i can help get you the > solution that you need. > > thanks, > > christian