|
Re: [TEXO] Uniqueness constraint [message #1586071 is a reply to message #1582881] |
Mon, 26 January 2015 11:54   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.05390 seconds