I'm passed these problems now - a couple of things i learned when
creating object and storing in data nucleus for later retrieval over
an RPC call

- Most importantly, if you are returning a complex object (like one
with a list of another type of object) you need to return a copy, not
the object data nucleus returns - return persitenceManager.detachCopy
(object)  - the object returned by PM has all sorts of stuff in it
that can't be serialized, the detached copy does not.

Next, if your are creating an object with lists of other object that
are not necessarily parent/child relationships or anything you want to
persist, you need to decorate it with @NotPersistent because app
engine will mark things as persistent for you even if you don't want
it or mark it as persistent. See this note in the doc:

Tip: JDO specifies that fields of certain types are persistent by
default if neither the @Persistent nor @NotPersistent annotations are
specified, and fields of all other types are not persistent by
default. See the DataNucleus documentation for a complete description
of this behavior. Because not all of the App Engine datastore core
value types are persistent by default according to the JDO
specification, we recommend explicitly annotating fields as
@Persistent or @NotPersistent to make it clear.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to