Re: Serializing and Deserializing EntityProxy with created EntityProxy inside makes root EntityProxy have created EntityProxy's stableId

2011-12-30 Thread Kevin Jordan
That appears to be the problem. Hopefully they put in a fix for it since I could reproduce it 100% of the time and it's not an easy bug to track down where it's happening. Thank you for the fix though. On Dec 29, 6:13 pm, Aidan O'Kelly aida...@gmail.com wrote: There's an issue with

Re: Serializing and Deserializing EntityProxy with created EntityProxy inside makes root EntityProxy have created EntityProxy's stableId

2011-12-29 Thread Kevin Jordan
There's a line missing between the String data = and the incorrect pasted line PersonProxy item =. For my example it should read: store = new DefaultProxyStore(data); //Recreate store from serialized data. TestRootProxy item = requestFactory.getSerializer(store).deserialize(TestRootProxy.class,

Serializing and Deserializing EntityProxy with created EntityProxy inside makes root EntityProxy have created EntityProxy's stableId

2011-12-29 Thread Kevin Jordan
I'm trying to preserve a modified EntityProxy's state between user session by using the ProxyStore to serialize it and deserialize it, but it appears that if it has a reference EntityProxy in a field inside, the root proxy's stableId gets overriden with the one of the created EntityProxy. This

Re: Serializing and Deserializing EntityProxy with created EntityProxy inside makes root EntityProxy have created EntityProxy's stableId

2011-12-29 Thread Kevin Jordan
Simple case in case my wording was a little confusing: TestRootProxy rootProxy = requestContext.create(TestRootProxy.class); //Doesn't matter if it's a loaded one or an unpersisted root rootProxy.setChild(requestContext.create(TestChildProxy.class)); DefaultProxyStore store = new

Re: Serializing and Deserializing EntityProxy with created EntityProxy inside makes root EntityProxy have created EntityProxy's stableId

2011-12-29 Thread Aidan O'Kelly
There's an issue with DefaultProxyStore that it doesn't always return sequential Ids from its nextId() method, which can result in some odd behaviour when serializing lists of ValueProxies, (all proxies point to the same object). Not sure if that's the issue here, but its worth giving a try as