Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO] Uniqueness constraint
[TEXO] Uniqueness constraint [message #1582881] Sat, 24 January 2015 17:34 Go to next message
Eclipse UserFriend
Hi,

Is it possible to set in an annotation model a multi-attribute uniqueness constraint for a tabe?

Thanks,

Cur
Re: [TEXO] Uniqueness constraint [message #1586071 is a reply to message #1582881] Mon, 26 January 2015 11:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Cur,
The JPA unique constraint allows multiple column names. See the attached screenshot for an example, so create the
following elements in an annotations model:
- annotated eclass
- orm annotation
- entity
- table
- uniqueconstraint with multiple column names


the example from the attached screenshort gives the following java code:
@Entity(name = "Bz423155_Main423155")
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "abc", "def" }, name = "my unique constraint") })
public class Main423155 {

gr. Martin

On 24-01-15 23:34, Mr Cur wrote:
> Hi,
>
> Is it possible to set in an annotation model a multi-attribute uniqueness constraint for a tabe?
>
> Thanks,
>
> Cur


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [TEXO] Uniqueness constraint [message #1586251 is a reply to message #1586071] Mon, 26 January 2015 14:09 Go to previous message
Eclipse UserFriend
Hi Martin,

Thanks.
This was what I was looking.

All the best,

Cur
Previous Topic:EMFStore and Edapt
Next Topic:do I have the correct download for the EMF plugin
Goto Forum:
  


Current Time: Wed Jul 02 17:11:56 EDT 2025

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

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

Back to the top