Okay, I'm replying to my own post here, because I've spent hours on this, making no progress. I've even set the serialized object into my entity, saved it, printed it out, evicted all entities from the persistence manager, found the entity again, then printed out the serialized object in that same request, and it all looks good.
When I come back to the server in a second request to grab that serialized object, it's gone. Only when I set it again in another transaction does it stick. Any ideas? Is there some weird behavior of saving serialized objects into a field that I might not be aware of? Why would this work on update, but not insert? On Mar 19, 1:32 am, Blake <[email protected]> wrote: > I thought this was working before, so I'm not sure if this is a PEPCAK > problem... > > I'm inserting an entity with aserializedcollection of otherserializedobjects. > This stores correctly on updates, but when I set > theserializedcollection on insert, it forgets the collection. Any > ideas? Would you expect insert and update to handle theserialized > collection of objects differently? > > Thanks! > > Here's how I'm doing it: > > public class Foo{ > ... > > @Persistent(serialized="true") > private Set<SomeSerializedObject> myObj; > > ... > > } > > Foo f = new Foo(); > f.setSomeSerializedObject(new SomeSerializedObject("foo bar")); > Transaction tx = pm.currentTransaction(); > try > { > tx.begin(); > pm.makePersistent(f); > tx.commit();} finally { > > if(tx.isActive()) > { > tx.rollback(); > } > > > > } -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
