Is there a way to use DAL to make a GAE query by entity name (not just 
numeric id)? I remember a discussion on the list about GAE keys with parents 
and a proposed patch for DAL to be able to pass GAE Key instead of if id. I 
see this implemented in the DAL code: 
http://code.google.com/p/web2py/source/browse/gluon/dal.py#3349

So, I was expecting something as simple as this to work:
id = request.args[0]
key = Key.from_path("data", "label:"+id)
entity = db.data[key]

But it doesn't. Neither do other variants of a DAL query:
entity = db(db.data.id == key).select().first()
entity = db.data(key)

Only the direct reference to GAE worked:
from google.appengine.ext import db as gae
entity = gae.get(key)

Do I expect too much and the access by GAE Key is not possible with DAL or 
this should work and can be fixed?

Reply via email to