[EMF] ID-IDREF resolution [message #661349] |
Thu, 24 March 2011 10:46 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello,
I have a EMF model which needs to be persisted as XML. The XML structure is slightly different from the model and it is tough to handle this using ExtendedMetaData annotations (especially due to this open point in EMF https://bugs.eclipse.org/bugs/show_bug.cgi?id=201662). Right now I have generated a Ecore model from XSD and am doing a model to model transformation to my final Ecore model. I am not sure how the ID-IDREF mechanism would work in this case. Should I resolve the references in my XSD ecore model manually to set the object references correctly in my output model. Is this mapping somewhere indexed in the input model/resource by EMF?
Thanks and regards,
Nirmal
[Updated on: Thu, 24 March 2011 13:21] Report message to a moderator
|
|
|
|
Re: [EMF] ID-IDREF resolution [message #661435 is a reply to message #661391] |
Thu, 24 March 2011 16:34 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Nirmal,
Yes, you need to indicate what type of object is being referenced.
You'll be able to edit it via the properties view like any
non-containment references and it will be serialized using the ID as
expected.
Nirmal Sasidharan wrote:
> Hi,
>
> I stumbled across a post to add ecore:reference within XSD. Would this
> be the right direction? This would mean I change a "read-only" XSD.
> Regards,
> Nirmal
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04343 seconds