diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/array/ArrayTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/array/ArrayTests.java index ce3c63c41c..61586889e7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/array/ArrayTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/mapping/array/ArrayTests.java @@ -1,5 +1,6 @@ package org.hibernate.orm.test.metamodel.mapping.array; +import java.util.List; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.Id; @@ -47,14 +48,11 @@ public class ArrayTests { ); } - @BeforeEach public void setUp(SessionFactoryScope scope) { scope.inTransaction( session -> { - ArrayTests.Employee employee = new ArrayTests.Employee(); - employee.setId( 1 ); - employee.setName( "Koen" ); + ArrayTests.Employee employee = new ArrayTests.Employee( 1, "Koen" ); employee.setToDoList( new String[] { "metro", "boulot", "dodo" } ); session.save( employee ); } @@ -76,6 +74,14 @@ public class ArrayTests { private String name; private String[] toDoList; + public Employee() { + } + + public Employee(Integer id, String name) { + this.id = id; + this.name = name; + } + @Id public Integer getId() { return id;