|
|
|
|
|
|
|
Re: [cdo] Containment always has 0 as its cdo_resource [message #1402956 is a reply to message #1402886] |
Fri, 18 July 2014 12:38  |
Eclipse User |
|
|
|
You should not use this manually, especially if you rely on the CDO cache/auditing/branching to work properly.
I think what you want is something like this:
EClass Parent:
- containment Child children 0 .. *
EClass Child:
- EString someAttribute
So, you have an ECLass "Parent" that is the container of objects of type "Child".
If you want to make the cdo tables have the cdo_resource set, you should *move* the child from the container to the resource (this is what Christophe said: either contained in a resource OR in a container):
Resource resource = ... // get your resource from CDO
Parent parent = ... // your business object that is the container
Child child = parent.getChildren(0); // the child you want to move to the resource
resource.getContents().add(child);
If you do not know what this all means, I think you should first get familiar with EMF, then try to adapt CDO.
saurav singh wrote on Fri, 18 July 2014 10:16Its very hard to find that where the actual code is for setting resource_id for the new added element. It would be great if someone can help me here.
|
|
|
Powered by
FUDForum. Page generated in 0.09159 seconds