Tuesday, February 5, 2013

Changing key type and Collection stored as a blob

Hello everyone,

I'm having troubles with GWT + AppEngine :

- my first problem was that I wanted to have a collection stored as a single blob. I did the same as http://stackoverflow.com/questions/3775228/how-do-i-annotate-a-collection-of-embedded-objects-in-google-app-engine-java except that my "Employee" key was a long, and thus, datanucleus was not happy with "ContactInfo" having no key specified ("can't have a Long key and be a child" etc…), then I had to add a Key key to that nested class "ContactInfo".

My objects were saved, but the collection was [null] every time (whereas, it was fine if I used foreignKey serialisation instead), in the DataStoreViewer as well as when I retrieved them.

- I though that maybe my primaryKey stuff was the problem, then I changed my Employee key type from long to Key (thinking that this way, I could remove the key from that "ContactInfo" class).
And well… He keeps using numbers as object Ids and says "org.datanucleus.identity.IdentityReference cannot be cast to org.datanucleus.identity.OID". Even if I clears every record for that type.

- Finally, the "defaultFetchGroup" addition that is suggested in the related article causes a "The datastore does not support joins and therefore cannot honor requests to place related objects in the default fetch group" warning (but maybe because of other errors ?)


Any help would be much appreciated because I'm a bit lost there…

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment