|Re: Cross-reference persistency [message #1063870 is a reply to message #1063857]
||Fri, 14 June 2013 15:34
| Ed Merks
Registered: July 2009
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
Powered by FUDForum
. Page generated in 0.01663 seconds