diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/ExchangeRateKey.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/ExchangeRateKey.java index d316f02bf8..83de37c37d 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/ExchangeRateKey.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/ExchangeRateKey.java @@ -24,10 +24,10 @@ public class ExchangeRateKey @Column(nullable = false) protected long date; - @javax.persistence.ManyToOne(fetch = FetchType.LAZY ) + @javax.persistence.ManyToOne(fetch = FetchType.LAZY, optional = false) protected Currency currency1; - @javax.persistence.ManyToOne(fetch = FetchType.LAZY ) + @javax.persistence.ManyToOne(fetch = FetchType.LAZY, optional = false) protected Currency currency2; diff --git a/hibernate-core/src/test/java/org/hibernate/test/type/converter/ElementCollectionTests.java b/hibernate-core/src/test/java/org/hibernate/test/type/converter/ElementCollectionTests.java index 74bb2af1f0..7e578a6bf0 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/type/converter/ElementCollectionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/test/type/converter/ElementCollectionTests.java @@ -175,7 +175,7 @@ public class ElementCollectionTests extends BaseCoreFunctionalTestCase { }) @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "entity_map", joinColumns = @JoinColumn(name = "entity_id", nullable = false)) - @MapKeyColumn(name = "key", nullable = false) + @MapKeyColumn(name = "`key`", nullable = false) @Column(name = "value", nullable = false) public Map map = new HashMap(); diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/enumcollection/User.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/enumcollection/User.java index 5216069a15..3f82beb314 100644 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/enumcollection/User.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/enumcollection/User.java @@ -32,10 +32,12 @@ import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; +import javax.persistence.Table; import java.util.HashSet; import java.util.Set; @Entity +@Table( name = "`User`" ) public class User { private Long id; private Set roles = new HashSet(); diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/EntityGraphUsingFetchGraphTest.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/EntityGraphUsingFetchGraphTest.java index 0ab11239bd..a855dfa61d 100644 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/EntityGraphUsingFetchGraphTest.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/EntityGraphUsingFetchGraphTest.java @@ -204,7 +204,7 @@ public class EntityGraphUsingFetchGraphTest extends BaseEntityManagerFunctionalT @Entity public static class CustomerOrder { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue public Long id; @OneToOne @@ -220,7 +220,7 @@ public class EntityGraphUsingFetchGraphTest extends BaseEntityManagerFunctionalT @Entity public static class Address { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue public Long id; public String city; @@ -229,7 +229,7 @@ public class EntityGraphUsingFetchGraphTest extends BaseEntityManagerFunctionalT @Entity public static class OrderPosition { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue public Long id; public Integer amount; @@ -242,7 +242,7 @@ public class EntityGraphUsingFetchGraphTest extends BaseEntityManagerFunctionalT @Entity public static class Product { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue public Long id; public String productName;