users@glassfish.java.net

Re: Entity design

From: <glassfish_at_javadesktop.org>
Date: Wed, 18 Mar 2009 12:45:26 PDT

Ah, like this?
@Table(name="municipality" uniqueConstraints = {_at_UniqueConstraint(columnNames = {"district_id", "name"})})

/Mattias

> Hi,
>
> Just add UNIQUE index on Municipality (district_id,
> name) in database.
>
> -
> Aleksandras Novikovas
>
[Message sent by forum member 'nightzero' (nightzero)]

http://forums.java.net/jive/thread.jspa?messageID=337794