You can serialize object graphs, but keep in mind that you won't be able to index/query this data and it will be opaque to the datastore viewer. It will also be opaque to GAE/Python tools.
As John mentioned, you can get embedded object collections without Java serialization if you use Objectify or Twig. Here is a document that describes how they work in Objectify, including the implementation details (I suspect Twig is similar): http://code.google.com/p/objectify-appengine/wiki/introductiontoobjecti...@embedded Jeff On Wed, Apr 7, 2010 at 11:36 AM, Tristan <[email protected]> wrote: > i work with low-level datastore api, so i serialize things myself, but > essentially yes. The issue you're probably running into is that the > thing that you're using to interact with the datastore, does not know > how to store EmbeddedChild. I would start there. > > from low-level datastore api point of view, you can only store a list > of String, Blob, Text, Integer.... the storable types. but I think > with the persistance manager you're using, the condition is that it > has to implement Serializable or IsSerializable interface (not sure > which one). > > On Apr 7, 1:13 pm, tempy <[email protected]> wrote: >> Well, what I need is something like this: >> >> @PersistenceCapable(detachable = "true") >> public class Parent { >> >> @PersistenceCapable >> @EmbeddedOnly >> public class EmbeddedChild {...} >> >> @Embedded >> private List<EmbeddedChild> Children; >> >> ... >> >> } >> >> This doesn't work, so... Do I understand you correctly, that to >> accomplish this I have to serialize "Children" into a Text value or >> something like that? >> >> On Apr 7, 7:40 pm, Tristan <[email protected]> wrote: >> >> >> >> > what do you mean by "store a list of embedded objects"? >> >> > if you're storing in the datastore, you have to have a way to >> > serialize whatever you got into one of the supported storable types. >> >> > On Apr 7, 11:04 am, tempy <[email protected]> wrote: >> >> > > I have been dealing with lots of varying exceptions trying to >> > > implement/store a list of embedded objects. I found one post on this >> > > group claiming that this isn't supported (but the claim didn't come >> > > from someone at Google), and I saw no mention of lists of embedded >> > > objects in the google docs... So, does anyone know for sure, if this >> > > is actually supported, or not? >> >> > > Thanks, >> > > Mike > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
