HHH-7498 some tests were targeting to the H2 only but now runs on db matrix

This commit is contained in:
Strong Liu 2012-08-03 18:19:40 +08:00
parent c8de4a1d4e
commit 00a83af879
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OrderBy; import javax.persistence.OrderBy;
import java.util.HashSet; import java.util.HashSet;
@ -74,6 +75,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@JoinTable(name = "T_NICKNAMES_A")
@OrderBy @OrderBy
public Set<String> getNickNamesAscendingNaturalSort() { public Set<String> getNickNamesAscendingNaturalSort() {
return nickNamesAscendingNaturalSort; return nickNamesAscendingNaturalSort;
@ -85,6 +87,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@JoinTable(name = "T_NICKNAMES_D")
@OrderBy( "desc" ) @OrderBy( "desc" )
public Set<String> getNickNamesDescendingNaturalSort() { public Set<String> getNickNamesDescendingNaturalSort() {
return nickNamesDescendingNaturalSort; return nickNamesDescendingNaturalSort;
@ -98,6 +101,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@OrderBy @OrderBy
@JoinTable(name = "T_ADDRESS_A")
public Set<Address> getAddressesAscendingNaturalSort() { public Set<Address> getAddressesAscendingNaturalSort() {
return addressesAscendingNaturalSort; return addressesAscendingNaturalSort;
} }
@ -109,6 +113,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@OrderBy( "desc" ) @OrderBy( "desc" )
@JoinTable(name = "T_ADDRESS_D")
public Set<Address> getAddressesDescendingNaturalSort() { public Set<Address> getAddressesDescendingNaturalSort() {
return addressesDescendingNaturalSort; return addressesDescendingNaturalSort;
} }
@ -120,6 +125,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@OrderBy( "city" ) @OrderBy( "city" )
@JoinTable(name = "T_ADD_CITY_A")
public Set<Address> getAddressesCityAscendingSort() { public Set<Address> getAddressesCityAscendingSort() {
return addressesCityAscendingSort; return addressesCityAscendingSort;
} }
@ -131,6 +137,7 @@ public class Person {
@ElementCollection @ElementCollection
@JoinColumn @JoinColumn
@OrderBy( "city desc" ) @OrderBy( "city desc" )
@JoinTable(name = "T_ADD_CITY_D")
public Set<Address> getAddressesCityDescendingSort() { public Set<Address> getAddressesCityDescendingSort() {
return addressesCityDescendingSort; return addressesCityDescendingSort;
} }

View File

@ -11,6 +11,7 @@ import org.hibernate.annotations.Filter;
import org.hibernate.annotations.FilterDef; import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.ParamDef; import org.hibernate.annotations.ParamDef;
import org.hibernate.annotations.SqlFragmentAlias; import org.hibernate.annotations.SqlFragmentAlias;
import org.hibernate.annotations.Type;
@Entity @Entity
@Table(name="T_USER") @Table(name="T_USER")
@ -38,6 +39,7 @@ public class User {
private String password; private String password;
@Column(name="LOCKED_OUT", table="SECURITY_USER") @Column(name="LOCKED_OUT", table="SECURITY_USER")
@Type( type = "numeric_boolean")
private boolean lockedOut; private boolean lockedOut;
public int getId() { public int getId() {