HHH-8085 QueryCacheTest.testGetByCompositeId fails on db2-97 -- DB2 SQL

Error: SQLCODE=-613
This commit is contained in:
Brett Meyer 2013-03-21 09:52:04 -04:00
parent 9f58f29502
commit 84e21fb18d
1 changed files with 13 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package org.hibernate.test.querycache;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
@ -9,13 +10,20 @@ public class StringCompositeKey implements Serializable {
private static final long serialVersionUID = 1L;
private String substation;
private String substation;
private String deviceType;
private String device;
public String getSubstation() {
private String analog;
// For some dialects, the sum of a primary key column lengths cannot
// be larger than 255 (DB2). Restrict them to a sufficiently
// small size. See HHH-8085.
@Column( length = 50 )
public String getSubstation() {
return substation;
}
@ -23,6 +31,7 @@ public class StringCompositeKey implements Serializable {
this.substation = substation;
}
@Column( length = 50 )
public String getDeviceType() {
return deviceType;
}
@ -31,6 +40,7 @@ public class StringCompositeKey implements Serializable {
this.deviceType = deviceType;
}
@Column( length = 50 )
public String getDevice() {
return device;
}
@ -39,6 +49,7 @@ public class StringCompositeKey implements Serializable {
this.device = device;
}
@Column( length = 50 )
public String getAnalog() {
return analog;
}
@ -46,6 +57,4 @@ public class StringCompositeKey implements Serializable {
public void setAnalog(String analog) {
this.analog = analog;
}
private String analog;
}