diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java index 248e2abdd..60d759892 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java @@ -322,22 +322,12 @@ public class ClassMappingInfo _uniques = new ArrayList(cinfo._uniques); } - public void addUnique(String name, String[] columnNames) { - if (columnNames == null || columnNames.length == 0) + public void addUnique(Unique unique) { + if (unique == null) return; if (_uniques == null) _uniques = new ArrayList(); - Unique uniqueConstraint = new Unique(); - uniqueConstraint.setName(name); - for (int i=0; i