Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Unique Contraint in Eattribute Objects([CDO] Unique Contraint in Eattribute Objects)
[CDO] Unique Contraint in Eattribute Objects [message #896248] Tue, 17 July 2012 17:25 Go to next message
Paco Blanco is currently offline Paco BlancoFriend
Messages: 28
Registered: June 2012
Junior Member
As we use EMF to model your classes, EMF Model are automatic translated to Database Schema/Model by CDO Server (in my case: DBStore on MySQL)

Is there some EMF Property (around an EAttribute child, I think unique emf property does not work), or something, to tell CDO that an EAtttribute (as String or Integer) must be translated to a column with UNIQUE constraint?

If not, I suppose I can manually put unique contraint in DB wihtout problems, or not?
Re: [CDO] Unique Contraint in Eattribute Objects [message #896328 is a reply to message #896248] Wed, 18 July 2012 05:08 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 17.07.2012 19:25, schrieb Paco Blanco:
> As we use EMF to model your classes, EMF Model are automatic translated to Database Schema/Model by CDO Server (in my
> case: DBStore on MySQL)
>
> Is there some EMF Property (around an EAttribute child, I think unique emf property does not work), or something, to
> tell CDO that an EAtttribute (as String or Integer) must be translated to a column with UNIQUE constraint?
I think there's nothing, yet. It would be nice to have an annotation-based solution for influencing index and constraint
creation. Similar to the DBAnnotation constants that can be used to influence column creation. Maybe you would like to
contribute such a patch?

> If not, I suppose I can manually put unique contraint in DB wihtout problems, or not?
I see nothing that speaks strictly against it ;-)

Cheers
/Eike

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


Previous Topic:Affected tree elements
Next Topic:[CDO] Best Practices: how to save a CDObject with unsaved references
Goto Forum:
  


Current Time: Thu Aug 22 18:46:22 GMT 2019

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

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

Back to the top