From d52998d0744c99c87110ae2657740eb20055b352 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Fri, 27 Jun 2008 22:54:51 +0000 Subject: [PATCH] OPENJPA-340: Formatting to 80 lines git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@672416 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/jdbc/unique/UniqueA.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/UniqueA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/UniqueA.java index aa28e0286..d6a558245 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/UniqueA.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/UniqueA.java @@ -32,9 +32,14 @@ import javax.persistence.UniqueConstraint; /** * Data structures for testing unique constraint settings - * on ORM Annotatations. + * on ORM Annotations. + * @UniqueConstraint annotation is declared at class-level with @Table, + * @SecondaryTable annotations and at field-level with @JoinTable annotation. * - * Unique columns must be non-nullable. + * The columns included in unique constraint must be non-nullable. This is + * recommended that the non-nullability of the column is explictly set by the + * user, though the implementation forces a column to non-nullable as a column + * is included in a unique constraint. * * @author Pinaki Poddar * @@ -73,8 +78,10 @@ public class UniqueA { @ManyToMany @JoinTable(name="UNIQUE_JOINTABLE", - joinColumns={@JoinColumn(name="FK_A", nullable=false, referencedColumnName="aid")}, - inverseJoinColumns={@JoinColumn(name="FK_B", nullable=false, referencedColumnName="bid")}, + joinColumns={@JoinColumn(name="FK_A", nullable=false, + referencedColumnName="aid")}, + inverseJoinColumns={@JoinColumn(name="FK_B", nullable=false, + referencedColumnName="bid")}, uniqueConstraints=@UniqueConstraint(columnNames={"FK_A","FK_B"})) private Collection bs; }