OPENJPA-1939: Increase index length for DB2 and testcase workaround for OPENJPA-1948

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1073042 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Dick 2011-02-21 16:06:05 +00:00
parent 5498030392
commit b44614d94b
2 changed files with 9 additions and 10 deletions

View File

@ -118,7 +118,7 @@ public class DB2Dictionary
}));
systemSchemas = "SYSCAT,SYSIBM,SYSSTAT,SYSIBMADM,SYSTOOLS";
maxConstraintNameLength = 18;
maxIndexNameLength = 18;
maxIndexNameLength = 128;
maxColumnNameLength = 30;
supportsDeferredConstraints = false;
supportsDefaultDeleteAction = false;
@ -345,7 +345,6 @@ public class DB2Dictionary
forUpdateClause = "WITH RR USE AND KEEP UPDATE LOCKS";
if (maj >=9) {
maxIndexNameLength=128;
supportsXMLColumn = true;
}
}

View File

@ -36,21 +36,21 @@ import javax.persistence.SecondaryTable;
import javax.persistence.Table;
@Entity
@Table(name="entity h", schema="delim id2")
@SecondaryTable(name="h sec join table", schema="delim id2",
pkJoinColumns=@PrimaryKeyJoinColumn(name="entity h",
referencedColumnName="h id"))
@Table(name="entity ha", schema="delim id2")
@SecondaryTable(name="ha sec join table", schema="delim id2",
pkJoinColumns=@PrimaryKeyJoinColumn(name="entity ha",
referencedColumnName="ha id"))
public class EntityH {
@Id
@Column(name="h id")
@Column(name="ha id")
private int id;
private String name;
@Column(table="h sec join table")
@Column(table="ha sec join table")
private String secName;
@ManyToMany
@JoinTable(name="h i", schema="delim id2")
@JoinTable(name="ha i", schema="delim id2")
private Collection<EntityI> entityIs = new HashSet<EntityI>();
@OneToOne
@ -58,7 +58,7 @@ public class EntityH {
private EntityI2 entityI2;
@ManyToMany
@JoinTable(name="map3 join table", schema="delim id2")
@JoinTable(name="map3a join table", schema="delim id2")
@MapKeyJoinColumn(name="map_ei3", referencedColumnName="entityI3 id")
Map<EntityI3,EntityI4> map = new HashMap<EntityI3,EntityI4>();