Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Composite Model in CDO
[CDO] Composite Model in CDO [message #764087] Sun, 11 December 2011 10:13 Go to next message
Khosro Asgharifard Sharabiani is currently offline Khosro Asgharifard SharabianiFriend
Messages: 35
Registered: December 2011
Member
Hi,
Excuse me for asking such a question,because i am a newbie in CDO.
Does CDO support composite model?
I mean,there is a system that has multiples Ecore.How can we persist models related to each Ecore in CDO and retrieve them as a whole system.
I think one of the possible solution is persisting each models of Ecore to a different resource(CDOResource table) of CDO.But we can not retrieve them as a whole system.For this purpose i think we must create a relation between resources in CDO.
How can we achieve this purpose?

Khosro.
Re: [CDO] Composite Model in CDO [message #764106 is a reply to message #764087] Sun, 11 December 2011 11:21 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 11.12.2011 11:13, schrieb Khosro Asgharifard Sharabiani:
> Hi,
> Excuse me for asking such a question,because i am a newbie in CDO.
> Does CDO support composite model?
> I mean,there is a system that has multiples Ecore.How can we persist models related to each Ecore in CDO and retrieve
> them as a whole system.
> I think one of the possible solution is persisting each models of Ecore to a different resource(CDOResource table) of
> CDO.But we can not retrieve them as a whole system.For this purpose i think we must create a relation between
> resources in CDO.
> How can we achieve this purpose?
CDO supports resources with instances of multiple models in the same way as EMF supports this. Just add arbitrary
objects to your resources and commit your transaction.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Composite Model in CDO [message #764164 is a reply to message #764106] Sun, 11 December 2011 14:49 Go to previous messageGo to next message
Khosro Asgharifard Sharabiani is currently offline Khosro Asgharifard SharabianiFriend
Messages: 35
Registered: December 2011
Member
>CDO supports resources with instances of multiple models in the same way as EMF >supports this. Just add arbitrary
>objects to your resources and commit your transaction.
The problem is that maybe there is a similar class in each Ecore(suppose that there is a Ecore1 that has class Book and a Ecore2 that also has class Book ),then when we use a single resource for both Ecore to add instance of their models,a conflict occurred.So that we must create a different resource for each of Ecore(res1 for Ecore1 and res2 for Ecore2.Maybe each of Ecores developed by different developer.).
And then how can we understand that they are(res1,res2) related to a single system?
I think we can use folder(CDOResourceFolder),and add res1 and res2 to a created folder.And now created folder is our system.
Am i right?

Khosro.
Re: [CDO] Composite Model in CDO [message #764198 is a reply to message #764164] Sun, 11 December 2011 16:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 11.12.2011 15:49, schrieb Khosro Asgharifard Sharabiani:
>> CDO supports resources with instances of multiple models in the same way as EMF >supports this. Just add arbitrary
>> objects to your resources and commit your transaction.
> The problem is that maybe there is a similar class in each Ecore(suppose that there is a Ecore1 that has class Book
> and a Ecore2 that also has class Book ),then when we use a single resource for both Ecore to add instance of their
> models,a conflict occurred.
A conflict occured where? When? Is there a stack trace? What store are you using?

The DBStore for example has several configuration options to disambiguate EClass names, see
http://wiki.eclipse.org/CDO/Server_Configuration_Reference#Element_store


> So that we must create a different resource for each of Ecore(res1 for Ecore1 and res2 for Ecore2.Maybe each of Ecores
> developed by different developer.).
No, CDO supports resources with instances of multiple models in the same way as EMF supports this. Just add arbitrary
objects to your resources and commit your transaction.

> And then how can we understand that they are(res1,res2) related to a single system?
What is a system?

> I think we can use folder(CDOResourceFolder),and add res1 and res2 to a created folder.And now created folder is our
> system.
That's technically possible, too.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Composite Model in CDO [message #764419 is a reply to message #764198] Mon, 12 December 2011 06:09 Go to previous message
Khosro Asgharifard Sharabiani is currently offline Khosro Asgharifard SharabianiFriend
Messages: 35
Registered: December 2011
Member
Thanks Eike for your help.
Let me explore a bit more about it.
Khosro.
Previous Topic:[CDO] Best way to support String ID
Next Topic:What is Resource and Resource set in EMF?
Goto Forum:
  


Current Time: Thu Apr 25 11:54:37 GMT 2024

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

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

Back to the top