Is there some better way to do the next task with DAL?
db.define_table('nodes',
SQLField('name'),
SQLField('parent_id', 'reference nodes'))
id1 = db.nodes.insert(name='root')
id2 = db.nodes.insert(name='child 1', parent_id=id1)
db.nodes.insert(name='child 2', parent_id=id2)
now I wanna get the name of parent node of 'child 2'
db(db(
db.nodes.name=='child 2').select()[0].parent_id ==
db.nodes.id).select()[0].name
The problem is.. for that task it will be processed two sql query..
with table aliases it is possible to make it only in one query..
is it possible with current version of DAL?