Objectify 4.1 released

359 views
Skip to first unread message

Jeff Schnitzer

unread,
Mar 28, 2014, 2:30:26 PM3/28/14
to objectify...@googlegroups.com
Since it sounds like GAE SDK 1.9.1 is having problems with the GWT
java sources in the objectify jar, I've promoted 4.1 a little early.
I'm confident in it.

This includes the new storage format. Please enable it - instructions
(and a big warning) are in the release notes:

https://code.google.com/p/objectify-appengine/wiki/ReleaseNotes

I highly, highly recommend that when you enable this flag, you do it
as a single-change push. Don't pile in a bunch of other changes in
your own code that you might need to revert. When you turn on this
flag, THERE IS NO GOING BACK!

Of course, if you don't use @Embed, it doesn't matter at all.

Jeff

Gabriel Axel

unread,
Mar 29, 2014, 6:05:32 PM3/29/14
to objectify...@googlegroups.com, je...@infohazard.org
Hi,

I upgraded to 4.1, set the new saving/loading mechanism, and got a problem with embedded maps - I had a map of String -> embedded entity annotated with @EmbedMap which was persisted with the <fieldname><dot><key> notation with 4.0, and with 4.1 the entire map is persisted into a single field (no <dot><key>), and it fails to load - when the field is annotated with @EmbedMap the exception message is "At path 'fieldname': Expected map structure but found: <the map as seen in the datastore viewer>" , and without @EmbedMap the message is similar but with "Expected property...".

It's not clear from the documentation whether maps should continue to act as in 4.0 with the <dot><key> notation, or as in 4.1 in a single field. What is is the direction for maps? Are maps supported in the new mechanism?

Thanks.

Jeff Schnitzer

unread,
Mar 30, 2014, 10:04:13 PM3/30/14
to Gabriel Axel, objectify...@googlegroups.com
This should work. Can you clarify exactly what your field declaration
looks like?

Here are the tests related to @EmbedMap:

https://code.google.com/p/objectify-appengine/source/browse/src/test/java/com/googlecode/objectify/test/EmbedMapTests.java
https://code.google.com/p/objectify-appengine/source/browse/src/test/java/com/googlecode/objectify/test/EmbedMapEmbedTests.java
https://code.google.com/p/objectify-appengine/source/browse/src/test/java/com/googlecode/objectify/test/EmbedMapFormatTests.java

The tests are run both with the new format flag enabled and without and pass.

Re-reading your msg, are you saying that you have a field like this?

Map<String, EmbeddedEntity> foo;

It's possible that my format auto-detection code is misguessing that -
I'll create some tests around it. I considered the normal case of
EmbeddedEntity occurring naturally (and there are tests around that)
but those tests don't extend to EmbeddedEntity as the target of
@EmbedMap.

Jeff

Jeff Schnitzer

unread,
Mar 31, 2014, 1:23:45 PM3/31/14
to Gabriel Axel, objectify...@googlegroups.com
I found the issue and released 4.1.1. It is propagating through maven
central now.

The auto-detection code was getting confused by too many
EmbeddedEntities. Sorry about that. I hope this didn't damage any
production data :(

Jeff

Gabriel Axel

unread,
Apr 2, 2014, 2:15:18 AM4/2/14
to objectify...@googlegroups.com, je...@infohazard.org
Great. Thanks.

Everything is still in development, no harm done.
Reply all
Reply to author
Forward
0 new messages