|
Re: EMF XMI Persistence multiple files [message #912377 is a reply to message #912363] |
Thu, 13 September 2012 12:59 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
It looks like the persons reference from Group to Person is a
containment reference. You have to change the GenModel property for
"Containment Proxies" to true. Then you will be able to put a Person in
a different resource than its containing Group. Simply create each
resource with the URI you want and add each Person to its own resource.
When you have the resources all set up, save them all.
On 13/09/2012 2:36 PM, Ar vraepe wrote:
> Hi everyone,
>
> I have been looking for quite some time for a solution to this
> problem. But I haven't found a 'readable' one yet.
>
> I have an EMF model (ecore, ecorediag, genmodel) in which I have only
> 2 classes. The first one is a Group class and the other one is a
> Person class. When I tried to persist these two via the vogella
> tutorial on EMF and XMI (can't link it), I found that when my Group
> was being persisted, the list op persons in that group was also in the
> same XMI file.
>
> So Group-> persons (0,*) -> Person translates in
>
>
> <XMI>
> <Group name="bla">
> <persons ... />
> <persons ... />
> ...
> </Group>
> </XMI>
>
>
> I know there is a possibility to persist these objects in such a way
> that it looks like this
>
> Group.xmi
>
> <XMI>
> <Group name="bla">
> <persons href="Person.xmi#id">
> ....
> </Group>
> </XMI>
>
>
> Person.xmi
>
> <XMI>
> <Person id="id">
> ...
> </Person>
> </XMI>
>
>
> The only question is .. how can I do this? I have found a lot of
> 'solutions' that say they do this... but they include strange
> things... and I just can't figure out how to make this work
>
> I thank you for reading this,
> regards
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03047 seconds