Closed alfonsodg closed 10 years ago
From massimo....@gmail.com on February 06, 2011 07:39:20
I think you refer to last_sql. No it is not being set in new dal. That is bug and there is already a ticket about it. Thanks for reporting it.
Status: Duplicate
From dly...@gmail.com on February 06, 2011 17:47:18
_last_reference is different than last_sql _last_reference is the native GAE datastore key to the underlying entity returned from an insert.
So I believe it is still an issue.
I tested my proposed patch on my own machine and it works - I was able to set it and get it later.
From dly...@gmail.com on February 06, 2011 06:46:47
What steps will reproduce the problem? 1. run a web2py app on GAE
What is the expected output? _last_reference What do you see instead? exception What version of the product are you using? On what operating system? Please provide any additional information below. In dal.py: def insert(self,table,fields): dfields=dict((f.name,self.represent(v,f.type)) for f,v in 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=184