Changes in Objectify 4.0rc1

155 views
Skip to first unread message

Jeff Schnitzer

unread,
May 18, 2013, 4:24:11 AM5/18/13
to objectify...@googlegroups.com
I'm doing some final cleanup on the Objectify API gearing up for the official 4.0 release.

I haven't put 4.0rc1 in maven central yet, but I'd love it if some other people tried out master. There are some changes:

 * ObjectifyWrapper and LoaderWrapper are gone; instead there is a *much* simpler system whereby you can directly extend ObjectifyImpl and LoaderImpl. I have updated the Motomapia example to demonstrate this.

 * ofy().getTxn() -> ofy().getTransaction(). I have some nefarious future plans for a method ofy().txn() and I want to eliminate the ambiguity now.

 * ofy().getFactory() -> ofy().factory(). It reads more fluently.

 * ofy().toEntity() and ofy().toPojo() are now ofy().save().toEntity() and ofy().load().fromEntity(). This means you can have load groups when you load().fromEntity(), whereas you couldn't before.

In some of these cases I left the old methods and added @Deprecation flags; they will be removed fairly quickly.

I can't think of any other changes that cannot be put off to 4.1, so if this build passes muster, it's going to become 4.0.

Jeff

Jeff Schnitzer

unread,
May 18, 2013, 11:50:58 AM5/18/13
to objectify...@googlegroups.com
This is now in Maven Central.

If I don't hear major complaints by Wednesday, I'm going to cut the official 4.0 release.

Jeff

Jon Sawyer

unread,
May 19, 2013, 5:42:47 PM5/19/13
to objectify...@googlegroups.com, je...@infohazard.org
I think I just ran into a bug. Updated to 4.0rc1, and it seems to be present in that version.

I'm trying to filter using the IN operator on the 'id'; for the value, I'm passing an String[] of values. Objectify complains:

[INFO] Caused by: java.lang.IllegalArgumentException: Id filter values must be Long or String
[INFO] at com.googlecode.objectify.impl.QueryImpl.addFilter(QueryImpl.java:147)
[INFO] at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:99)
[INFO] at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:32)

Is this Objectify giving early warning of an appengine datastore limitation, or is it erroneously assuming filter values must always be a scalar?

Jon

Jon Sawyer

unread,
May 19, 2013, 5:57:06 PM5/19/13
to objectify...@googlegroups.com, je...@infohazard.org
Tried the same thing with an ArrayList<String>; same result.

BTW, this seems like it's another type of query that Objectify could optimize into a hybrid query. Does it?

Jon
Reply all
Reply to author
Forward
0 new messages