Closed GoogleCodeExporter closed 9 years ago
Damnit, I should have investigated further. This has already been reported in
issue 96. My apologies.
Original comment by mattias....@gmail.com
on 9 Nov 2011 at 4:57
This is an explicit (and well-documented) design decision.
long (lowercase) id fields are *never* autogenerated.
Long (uppercase) id fields are autogenerated when they are null.
0 is disallowed as an id by the datastore.
Use lowercase-long id fields when you have integer natural keys. Use
uppercase-Long when you have synthetic keys. If we allowed lowercase-long id
fields to autogenerate, any programming mistake that put an uninitialized 0 in
the database would trigger the allocator and potentially overwrite an existing
natural key.
Issue 96 is specifically about Scala integration.
Original comment by lhori...@gmail.com
on 9 Nov 2011 at 7:22
Double damnit, I can't believe I missed that on the wiki. I feel like an idiot
right now. :-P
Thanks for responding though. :-)
Original comment by mattias....@gmail.com
on 9 Nov 2011 at 10:57
No prob :-)
Original comment by lhori...@gmail.com
on 9 Nov 2011 at 11:07
Which page in Objectify's documentation contains this information? I cannot
find this anywhere except in this Google Code issue page.
Original comment by ecb0...@gmail.com
on 26 Dec 2012 at 9:24
https://code.google.com/p/objectify-appengine/wiki/Entities#The_Basics
Original comment by lhori...@gmail.com
on 27 Dec 2012 at 12:56
Original issue reported on code.google.com by
mattias....@gmail.com
on 9 Nov 2011 at 4:49