Cross-reference persistency [message #1063857] |
Fri, 14 June 2013 10:22  |
Eclipse User |
|
|
|
I have got two resources, which are serialized to files.
And i have a cross-reference (non-containment) from one part of the model (in first file) to another part (second file). While resources are being deserialized from these files (second one, then first one) cross reference is initialized via new instance of object which is filled with correct data if "resolve proxies" is set true.
But though - it's a bug, cause I need a real cross reference (non-containment), but get a new object without container wich is now pointed by my cross-reference. What I should do? Is it necessary to put all model in a single resource??
|
|
|
Re: Cross-reference persistency [message #1063870 is a reply to message #1063857] |
Fri, 14 June 2013 11:34  |
Eclipse User |
|
|
|
Fedor,
Comments below.
On 14/06/2013 4:43 PM, Fedor Malyshev wrote:
> I have got two resources, which are serialized to files.
What URIs do these resources have?
> And i have a cross-reference (non-containment) from one part of the
> model (in first file) to another part (second file).
What do the serialized URIs look like in the result?
> While resources are being deserialized from these files (second one,
> then first one) cross reference is initialized via new instance of
> object which is filled with correct data if "resolve proxies" is set true.
What URIs did you use to load the resources? Note that during
deserialization a proxy instance is created. Later when you access the
data it will be resolved (or at least an attempt to do so is made).
> But though - it's a bug, cause I need a real cross reference
> (non-containment), but get a new object without container wich is now
> pointed by my cross-reference.
That sounds like a proxy.
> What I should do?
Generally proxies are resolved automatically, so you must be doing
something wrong, but without answers to my questions above, I can't be
sure what that might be.
> Is it necessary to put all model in a single resource??
No, of course not.
But it is generally necessary to ensure you use absolute URIs when
saving and loading resources so that the serialized URIs in the results
are relative URIs.
If you have follow up questions, please be sure to answer the questions
above.
|
|
|
Powered by
FUDForum. Page generated in 0.04780 seconds