Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Prefix Table Names
[CDO] Prefix Table Names [message #675397] Tue, 31 May 2011 11:43 Go to next message
Markus  is currently offline Markus Friend
Messages: 3
Registered: May 2011
Junior Member
I successfully migrated my ecore models to use CDO..

Now there's an issue though when CDO creates the tables to map instances. The Tables are named according to its classnames... I have three Classes which are called "DocumentRoot".
They are in different packages and different namespaces, yet the name CDO wants to use is just "DocumentRoot" which fails.

Is there a parameter to make it name databases according to namespace_class or something?
Re: [CDO] Prefix Table Names [message #687109 is a reply to message #675397] Tue, 31 May 2011 16:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Note that you could use an ecore:documentRoot annotation in the schema
to assign a unique name...


forums-noreply@eclipse.org wrote:
> I successfully migrated my ecore models to use CDO..
>
> Now there's an issue though when CDO creates the tables to map
> instances. The Tables are named according to its classnames... I have
> three Classes which are called "DocumentRoot".
> They are in different packages and different namespaces, yet the name
> CDO wants to use is just "DocumentRoot" which fails.
>
> Is there a parameter to make it name databases according to
> namespace_class or something?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [CDO] Prefix Table Names [message #687111 is a reply to message #675397] Tue, 31 May 2011 20:18 Go to previous messageGo to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
On 5/31/2011 7:43 AM, forums-noreply@eclipse.org wrote:
> I successfully migrated my ecore models to use CDO..
>
> Now there's an issue though when CDO creates the tables to map
> instances. The Tables are named according to its classnames... I have
> three Classes which are called "DocumentRoot".
> They are in different packages and different namespaces, yet the name
> CDO wants to use is just "DocumentRoot" which fails.
>
> Is there a parameter to make it name databases according to
> namespace_class or something?
There are indeed a number of properties used to make those type of
adjustments.

Please have a look at
http://wiki.eclipse.org/CDO_Server_Configuration_Reference#Property_qualifiedNames

Cheers,
Alain
Re: [CDO] Prefix Table Names [message #687336 is a reply to message #675397] Tue, 31 May 2011 16:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Note that you could use an ecore:documentRoot annotation in the schema
to assign a unique name...


forums-noreply@eclipse.org wrote:
> I successfully migrated my ecore models to use CDO..
>
> Now there's an issue though when CDO creates the tables to map
> instances. The Tables are named according to its classnames... I have
> three Classes which are called "DocumentRoot".
> They are in different packages and different namespaces, yet the name
> CDO wants to use is just "DocumentRoot" which fails.
>
> Is there a parameter to make it name databases according to
> namespace_class or something?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [CDO] Prefix Table Names [message #687338 is a reply to message #675397] Tue, 31 May 2011 20:18 Go to previous messageGo to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
On 5/31/2011 7:43 AM, forums-noreply@eclipse.org wrote:
> I successfully migrated my ecore models to use CDO..
>
> Now there's an issue though when CDO creates the tables to map
> instances. The Tables are named according to its classnames... I have
> three Classes which are called "DocumentRoot".
> They are in different packages and different namespaces, yet the name
> CDO wants to use is just "DocumentRoot" which fails.
>
> Is there a parameter to make it name databases according to
> namespace_class or something?
There are indeed a number of properties used to make those type of
adjustments.

Please have a look at
http://wiki.eclipse.org/CDO_Server_Configuration_Reference#Property_qualifiedNames

Cheers,
Alain
Re: [CDO] Prefix Table Names [message #693424 is a reply to message #687111] Wed, 06 July 2011 13:00 Go to previous messageGo to next message
Markus  is currently offline Markus Friend
Messages: 3
Registered: May 2011
Junior Member
The qualified name switch was what I looked for, thanks much Smile

Regarding the ecore:documentRoot, is there a list somewhere where all these annotations are described?
Re: [CDO] Prefix Table Names [message #693485 is a reply to message #693424] Wed, 06 July 2011 14:32 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 06.07.2011 15:00, schrieb Markus:
> The qualified name switch was what I looked for, thanks much :)
>
> Regarding the ecore:documentRoot, is there a list somewhere where all these annotations are described?

Although there are no descriptions (internal code), here you can see an uptodate list: http://dev.eclipse.org/svnroot/modeling/org.eclipse.emf.cdo/trunk/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBAnnotation.java

It strikes me that we should make this enum public and properly document it. Stefan, what do you think?

Cheers
/Eike

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


Previous Topic:Retrieving the parent siblings on an EObject
Next Topic:Again schema Problem when loading serialized Model
Goto Forum:
  


Current Time: Fri Apr 26 17:27:59 GMT 2024

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

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

Back to the top