EntityNotFoundException in Hibernate - fix persistence unit config to allow multiple test to run in conjunction.
This commit is contained in:
parent
fbe9fbf752
commit
0372e0fba5
|
@ -15,7 +15,6 @@ public class Item implements Serializable {
|
|||
private String name;
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "category_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
private Category category;
|
||||
|
||||
public long getId() {
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db2;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.user" value="sa"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
</properties>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<property name="hibernate.generate_statistics" value="false"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db3;DB_CLOSE_DELAY=-1"/>
|
||||
<property name="javax.persistence.jdbc.user" value="sa"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
</properties>
|
||||
|
|
Loading…
Reference in New Issue