|Re: Serializing EObject using Object handle [message #655640 is a reply to message #654864]
||Tue, 22 February 2011 06:13
| Ed Merks
Registered: July 2009
> In my model I have an object with a reference to an EJavaObject.
> During run time I sometimes populate this reference with a raw type,
> or String and sometimes with an EObject - EList or other model
> generated object.
That sounds problematic, given that EList and EObject don't generally
> EMF serialization cannot handle both EObject and Object. Meaning,
> since the reference type is Object it will attempt to serialize
> everything using Java serialization, rather than using EMF
> serialization when possible.
> Is there a way around this?
There's a bugzilla open about implementing java.io.Serializeable, but
it's not complete yet.
> The reason I used EJavaObject and not EObject is again, because I
> sometimes want the ref to point to a raw type.
You could look at how the Change model deals with this, i.e., by having
both an EReference and an EAttribute for the value...
Powered by FUDForum
. Page generated in 0.01442 seconds