Closed GoogleCodeExporter closed 8 years ago
Just FYI, this is because every evaluation at the console runs as a full
transaction
(auto-committing after each evaluation) unless you set autocommit to false. In a
class method, each request is a transaction, so the whole function is executed
in a
single transaction, which does not commit until finished. Currently, the id for
a new
object is not assigned to an object until the transaction is committed, because
the
data to be persisted is not sent to the database until committal, so when the
transaction is still open and uncomitted, the id is a temporary id.
That being said, this is still an issue, and I would like to fix this (by
querying
the database for a new id prior to committing the transaction).
Original comment by nikki...@gmail.com
on 26 Dec 2008 at 5:46
OK, thanks - in the meantime I can do an extra commit to get the ID associated
with the new object.
Original comment by lst...@gmail.com
on 27 Dec 2008 at 6:50
Original comment by kris...@gmail.com
on 30 Apr 2009 at 3:38
Original comment by kris...@gmail.com
on 6 Jun 2009 at 4:09
Original issue reported on code.google.com by
lst...@gmail.com
on 25 Dec 2008 at 11:38