put some annotations back in a very important test
This commit is contained in:
parent
f676a1e2af
commit
ce860e31ff
|
@ -23,7 +23,7 @@ import org.junit.Test;
|
|||
public class ManyToOneReferencedColumnNameTest extends BaseCoreFunctionalTestCase {
|
||||
@Test
|
||||
@RequiresDialectFeature(DialectChecks.SupportsIdentityColumns.class)
|
||||
public void testReoverableExceptionInFkOrdering() throws Exception {
|
||||
public void testRecoverableExceptionInFkOrdering() throws Exception {
|
||||
//SF should not blow up
|
||||
Vendor v = new Vendor();
|
||||
Item i = new Item();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
//$
|
||||
package org.hibernate.orm.test.annotations.manytoone.referencedcolumnname;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
|
@ -16,7 +17,6 @@ import jakarta.persistence.ManyToOne;
|
|||
@Entity
|
||||
public class WarehouseItem extends GenericObject {
|
||||
|
||||
|
||||
Item item;
|
||||
Vendor vendor;
|
||||
ZItemCost defaultCost;
|
||||
|
@ -33,7 +33,7 @@ public class WarehouseItem extends GenericObject {
|
|||
|
||||
@ManyToOne
|
||||
//(fetch=FetchType.LAZY)
|
||||
@JoinColumn( name = "ITEM_ID", unique = false, nullable = false, insertable = true, updatable = true )
|
||||
@JoinColumn( name = "item_id", nullable = false)
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class WarehouseItem extends GenericObject {
|
|||
}
|
||||
|
||||
@ManyToOne( fetch = FetchType.LAZY )
|
||||
@JoinColumn( name = "VENDOR_ID", unique = false, nullable = false, insertable = true, updatable = true )
|
||||
@JoinColumn( name = "vendor_id", nullable = false)
|
||||
public Vendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
//$
|
||||
package org.hibernate.orm.test.annotations.manytoone.referencedcolumnname;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
|
@ -20,7 +22,7 @@ public class ZItemCost extends GenericObject {
|
|||
BigDecimal cost;
|
||||
|
||||
@ManyToOne( fetch = FetchType.LAZY )
|
||||
//@JoinColumn(name="ITEM_ID", unique=false, nullable=false, insertable=true, updatable=true)
|
||||
@JoinColumn(name="item_id", nullable=false)
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
@ -30,7 +32,7 @@ public class ZItemCost extends GenericObject {
|
|||
}
|
||||
|
||||
@ManyToOne( fetch = FetchType.LAZY )
|
||||
//@JoinColumn(name="VENDOR_ID", unique=false, nullable=false, insertable=true, updatable=true)
|
||||
@JoinColumn(name="vendor_id", nullable=false)
|
||||
public Vendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue