asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

save().now() returns Key<?> in version 5.0.2 instead of the persisted object #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I call save() in objectify 4.0b3, the full object is returned.

User user = ofy().save().entity(user).now();

Version 5.0.2 returns the Key of the object instead, which is not consistent 
with the documentation.

Key<User> = ofy().save().entity(user).now();

Has this been changed? Then an example should be shown how the Key is supposed 
to be passed over REST and re-integrated into the client-side object.

See also: 
https://groups.google.com/forum/#!topic/objectify-appengine/uygw9mgHDhg

Original issue reported on code.google.com by casinit...@gmail.com on 21 May 2014 at 3:44

GoogleCodeExporter commented 9 years ago
I actually looked up the signature of ofy().save().entity(T).now() in 4.0b3 and 
it did not return T, it returns Key<T>. But that's not really the point, change 
happens. If you think it should return a different value, make a case for it on 
the mailing list.

Original comment by lhori...@gmail.com on 21 May 2014 at 4:05