Hi, I think that this is actually a limitation of OpenJPA currently -- OpenJPA ignores unique constraints and some (most?) index definitions when generating a schema.
Could you attach the full stack trace to https://issues.apache.org/jira/browse/OPENJPA-340 please? It'll be useful for resolving the issue. -Patrick On 8/28/07, Ignacio Andreu <[EMAIL PROTECTED]> wrote: > Hi, > > Regarding the documentation about OpenJPA you can define a unique column > with something like that: > > @Entity > @Table(name="ART", [EMAIL PROTECTED](columnNames="TITLE")) > public class Article { > ... > } > > And in XML > > <entity class="org.mag.Article"> > <table name="ART"> > <unique-constraint> > <column-name>TITLE</column-name> > </unique-constraint> > </table> > ... > </entity> > > For more information see the "Unique Constraints" section [1] > > - Ignacio > > > [1] > http://openjpa.apache.org/docs/latest/manual/manual.html#jpa_overview_mapping_unq > > On 8/28/07, ben short <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am trying to use the @UniqueConstraint annotation but get the > > following error message.. > > > > OpenJPA does not yet support the @UniqueConstraint annotation. > > > > Is that any plan to implement this feature in the near future? Can I > > define the mapping for the class that I'm trying to annotate in xml > > rather than use the annotations to use the UniqueConstraint feature? > > > > Regards > > > > Ben Short > > > -- Patrick Linskey 202 669 5907