What steps will reproduce the problem? 1. write a app for gae which inserts a record into mytable, which returns myrid
try x = myrid._mytable._db._last_reference
observe error
What is the expected output?
myrid._mytable._db._last_reference should work
What do you see instead?
code written based on the '_last_reference' mod from June 27, 2010 is broken. What version of the product are you using? On what operating system? Please provide any additional information below. This change was originally put into the trunk on June 27, 2010.
It is needed to support creating trees which benefit from the performance
of the native gae datastore. Specifically, when creating the root of a tree, we need to get the native ref so that later when leafs are inserted, they have the native ref of the root to use as a backpointer.
IMO, the entire DALnr functionality rests on this one line of code.
It is the only place in web2py where it is necessary to expose a
native reference into the web2py application, that is, upon insert.
The one line of suggested patch is shown below:
def insert(self,table,fields):
dfields=dict((f.name,self.represent(v,f.type)) for f,v in
From dly...@gmail.com on February 07, 2011 05:04:45
What steps will reproduce the problem? 1. write a app for gae which inserts a record into mytable, which returns myrid
What is the expected output?
myrid._mytable._db._last_reference should work
What do you see instead? code written based on the '_last_reference' mod from June 27, 2010 is broken. What version of the product are you using? On what operating system? Please provide any additional information below. This change was originally put into the trunk on June 27, 2010. It is needed to support creating trees which benefit from the performance of the native gae datastore. Specifically, when creating the root of a tree, we need to get the native ref so that later when leafs are inserted, they have the native ref of the root to use as a backpointer. IMO, the entire DALnr functionality rests on this one line of code. It is the only place in web2py where it is necessary to expose a native reference into the web2py application, that is, upon insert.
The one line of suggested patch is shown below:
fields)
table._db['_lastsql'] = self._insert(table,fields)
June 27/2010 mod in the trunk rid = Reference(tmp.key().id()) (rid._table, rid._record) = (table, None) return rid
Original issue: http://code.google.com/p/web2py/issues/detail?id=185