I think we should set the serialization of the generated superclass to 1L because it doesn't have any serializable fields, and likely never will.
I also think we should set the generate-once subclasses to 1L because it won't have any serializable fields unless the developer does something further. Both values should be marked private. I have in the past written a web app that serialized Cayenne Data Objects in a request and then restored them in future requests. Yes, the objects are detached from the DataContext when that happens (at least as of Cayenne 2). I had to augment the serialization methods to reattach the objects back to a context, if I recall. On Fri, Jun 15, 2012 at 9:11 AM, Michael Gentry <[email protected]>wrote: > I didn't think this worked, anyway? If Tomcat (and others) serialize > a bunch of Cayenne objects, then deserialize on startup, aren't they > detached from their DataContext now? > > On Fri, Jun 15, 2012 at 5:21 AM, Andrus Adamchik <[email protected]> > wrote: > > Serialized HttpSessions is one common case. This is on in Tomcat by > default, so every time you restart the server, Tomcat goes through > serialization cycle. >
