HHH-9054 QuoteTest violates unique key constraint on some DBs

Conflicts:
	hibernate-core/src/test/java/org/hibernate/test/quote/User.java
This commit is contained in:
Brett Meyer 2014-03-17 15:15:43 -04:00
parent 7c45e7eb15
commit f0af00b5a9
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import java.io.Serializable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
@ -40,9 +41,12 @@ public class User implements Serializable {
private Long house1; private Long house1;
@Column(name = "`house`", insertable = false, updatable = false ) @Column(name = "`house`", insertable = false, updatable = false )
private Long house2; private Long house2;
@ManyToOne
// test UK on FK w/ global quoting -- see HHH-8638
// This MUST be initialized. Several DBs do not allow multiple null values in a unique column.
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "house3") @JoinColumn(name = "house3")
private House house3; // test UK on FK w/ global quoting -- see HHH-8638 private House house3 = new House();
public long getId() { public long getId() {
return id; return id;