Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » One object in two resources
One object in two resources [message #697029] Fri, 15 July 2011 11:00 Go to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Okay, here's the situation:

We have one tableviewer with all persons. This is a seperate view with an editing domain and commandstack. The persons are in a resource. All persons are stored in a Oracle database and it's connection is set with Teneo Hibernate.

We want to open one person in a editor with a seperate resource. This is done with a URI to a single object. This way we have a single commandstack per editor. The thing is, when we load this single resource, the person in the parentresource (where all persons are loaded) is gone... Is it not possible to have the same object in multiple resources? Or is there another way to achieve what we want??

Anyone? Thanks in advance.

Regards,
Rick

Re: One object in two resources [message #697067 is a reply to message #697029] Fri, 15 July 2011 13:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EMF accurately supports a single containment paradigm. If you want
multiples, you should use references rather than containment.

Regards

Ed Willink

On 15/07/2011 12:00, Ricky de Klerck wrote:
> Okay, here's the situation:
>
> We have one tableviewer with all persons. This is a seperate view with
> an editing domain and commandstack. The persons are in a resource. All
> persons are stored in a Oracle database and it's connection is set
> with Teneo Hibernate.
>
> We want to open one person in a editor with a seperate resource. This
> is done with a URI to a single object. This way we have a single
> commandstack per editor. The thing is, when we load this single
> resource, the person in the parentresource (where all persons are
> loaded) is gone... Is it not possible to have the same object in
> multiple resources? Or is there another way to achieve what we want??
>
> Anyone? Thanks in advance.
>
> Regards,
> Rick
>
>
Re: One object in two resources [message #697119 is a reply to message #697067] Fri, 15 July 2011 14:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Ed,

There is support for cross document containment. I.e., a child object
can be in a different from its container object. That's supported only
in the case that EReference.resolveProxies is true and, for generated
models, if the GenModel's Containment Proxies is set to true.


On 15/07/2011 6:03 AM, Ed Willink wrote:
> Hi
>
> EMF accurately supports a single containment paradigm. If you want
> multiples, you should use references rather than containment.
>
> Regards
>
> Ed Willink
>
> On 15/07/2011 12:00, Ricky de Klerck wrote:
>> Okay, here's the situation:
>>
>> We have one tableviewer with all persons. This is a seperate view
>> with an editing domain and commandstack. The persons are in a
>> resource. All persons are stored in a Oracle database and it's
>> connection is set with Teneo Hibernate.
>>
>> We want to open one person in a editor with a seperate resource. This
>> is done with a URI to a single object. This way we have a single
>> commandstack per editor. The thing is, when we load this single
>> resource, the person in the parentresource (where all persons are
>> loaded) is gone... Is it not possible to have the same object in
>> multiple resources? Or is there another way to achieve what we want??
>>
>> Anyone? Thanks in advance.
>>
>> Regards,
>> Rick
>>
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Cannot modify a frozen revision
Next Topic:EMF 2.7 with Eclipse 3.6
Goto Forum:
  


Current Time: Thu Mar 28 21:22:17 GMT 2024

Powered by FUDForum. Page generated in 0.07332 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top