[CDO] Unique Contraint in Eattribute Objects [message #896248] |
Tue, 17 July 2012 13:25  |
Eclipse User |
|
|
|
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 01:08  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02865 seconds