aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabine Heider2013-04-03 06:18:43 (EDT)
committertware2013-05-16 10:18:42 (EDT)
commit3b76d692ef94cea43aa48f0c99a5dd97dbf6f7d2 (patch)
tree05ed28fa2e23a3e5908159dbfb2b8dd93b3a2b7d
parent16d3cc4ebace0f8b999955533451d18307765853 (diff)
downloadeclipselink.runtime-3b76d692ef94cea43aa48f0c99a5dd97dbf6f7d2.zip
eclipselink.runtime-3b76d692ef94cea43aa48f0c99a5dd97dbf6f7d2.tar.gz
eclipselink.runtime-3b76d692ef94cea43aa48f0c99a5dd97dbf6f7d2.tar.bz2
Bug 404975 - Add NOT NULL to primary key columns in WDF test tables
Sybase ASE requires a NOT NULL column constraint if the column is part of a primary key. This constraint is added to the test entities' column definitions where needed. Signed-off-by: Sabine Heider <sabine.heider@sap.com>
-rw-r--r--jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Item_Byte.java2
-rw-r--r--jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/TravelProfile.java3
-rw-r--r--jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Vehicle.java2
3 files changed, 4 insertions, 3 deletions
diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Item_Byte.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Item_Byte.java
index 6f047f3..36a794d 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Item_Byte.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Item_Byte.java
@@ -34,7 +34,7 @@ import org.eclipse.persistence.testing.framework.wdf.customizer.AdjustArrayTypeC
@Customizer(AdjustArrayTypeCustomizer.class)
public class Item_Byte implements Serializable {
@Id
- @Column(name = "ITEM_ID", columnDefinition=TravelProfile.BINARY_16_COLUMN)
+ @Column(name = "ITEM_ID", columnDefinition=TravelProfile.BINARY_16_COLUMN_NOT_NULL)
private byte[] itemId;
private String namespace;
private String text;
diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/TravelProfile.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/TravelProfile.java
index d9fe869..3df79d3 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/TravelProfile.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/TravelProfile.java
@@ -31,6 +31,7 @@ import org.eclipse.persistence.testing.framework.wdf.customizer.AdjustArrayTypeC
public class TravelProfile {
static final String BINARY_16_COLUMN = "BINARY(16)";
+ static final String BINARY_16_COLUMN_NOT_NULL = "BINARY(16) NOT NULL";
/**
* @param guid
@@ -92,7 +93,7 @@ public class TravelProfile {
* @return Returns the guid.
*/
@Id
- @Column(length = 16, columnDefinition=BINARY_16_COLUMN)
+ @Column(length = 16, columnDefinition=BINARY_16_COLUMN_NOT_NULL)
public byte[] getGuid() {
return guid;
}
diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Vehicle.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Vehicle.java
index 13c3586..f69a400 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Vehicle.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Vehicle.java
@@ -63,7 +63,7 @@ public class Vehicle implements Serializable {
int version;
@ManyToMany
- @JoinTable(name = "TMP_VEHICLE_PROFILE", joinColumns = { @JoinColumn(name = "VEHICLE_ID") }, inverseJoinColumns = { @JoinColumn(name = "PROFILE_ID", columnDefinition=TravelProfile.BINARY_16_COLUMN) })
+ @JoinTable(name = "TMP_VEHICLE_PROFILE", joinColumns = { @JoinColumn(name = "VEHICLE_ID") }, inverseJoinColumns = { @JoinColumn(name = "PROFILE_ID", columnDefinition=TravelProfile.BINARY_16_COLUMN_NOT_NULL) })
private Set<TravelProfile> profiles;