Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Setting a 'unique' constraint on a many-to-one reference in hibernate
[Teneo] Setting a 'unique' constraint on a many-to-one reference in hibernate [message #601966] Fri, 02 February 2007 06:17
Eclipse UserFriend
Originally posted by:

I'm trying to add a unique constraint to a many-to-one Ereference in my =

ecore model using Eannotaions. I've added the following Eannotation to =

the Ereference:

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"userAc=
count" =

<eAnnotations source=3D"teneo.hibernate">
<details key=3D"appinfo" value=3D"@Column(unique=3D&quot;true=

This works fine for an Eattribute, but doesn't seem to have any effect o=
n =

the generated hibernate mappings for an EReference:

<many-to-one name=3D"userAccount" entity-name=3D"UserAccount" =

cascade=3D"merge,persist,save-update,lock,refresh" lazy=3D"false" =

insert=3D"true" update=3D"true" not-null=3D"false">
<column not-null=3D"false" unique=3D"false" =


I'm still new to fiddling about with the Eannotations, so please forgive=

me if this is a dumb question.

Previous Topic:teneo: Yet another DuplicateMappingException problem
Next Topic:[Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using data
Goto Forum:

Current Time: Fri Feb 26 11:04:27 GMT 2021

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

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

Back to the top