HHH-18830 fix tests
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
9e5bd35cbb
commit
afa373f7c3
|
@ -108,6 +108,11 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
|
|||
throw new GoofyException(NoopEntityPersister.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean managesColumns(String[] columnNames) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NavigableRole getNavigableRole() {
|
||||
return null;
|
||||
|
@ -1331,5 +1336,7 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
|
|||
public EntityPersister getElementPersister() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,10 +159,8 @@ public class CompositeIdTest {
|
|||
|
||||
statementInspector.clear();
|
||||
session.flush();
|
||||
statementInspector.assertExecutedCount( 3 );
|
||||
statementInspector.assertExecutedCount( 1 );
|
||||
statementInspector.assertIsInsert( 0 );
|
||||
statementInspector.assertIsUpdate( 1 );
|
||||
statementInspector.assertIsUpdate( 2 );
|
||||
|
||||
|
||||
statementInspector.clear();
|
||||
|
|
|
@ -47,6 +47,7 @@ public class MapKeyColumnBiDiOneToManyFKTest extends BaseNonConfigCoreFunctional
|
|||
Address2 address = session.get( Address2.class, 1 );
|
||||
|
||||
address.holder = holder;
|
||||
address.type = "work";
|
||||
holder.addresses.put( "work", address );
|
||||
|
||||
session.persist( holder );
|
||||
|
|
|
@ -1074,6 +1074,11 @@ public class PersisterClassProviderTest {
|
|||
public String getAttributeMutationTableName(int i) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean managesColumns(String[] columnNames) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GoofyException extends RuntimeException {
|
||||
|
|
|
@ -1181,4 +1181,9 @@ public class CustomPersister implements EntityPersister {
|
|||
public String getAttributeMutationTableName(int i) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean managesColumns(String[] columnNames) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import jakarta.persistence.Id;
|
|||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OrderColumn;
|
||||
import org.hibernate.Hibernate;
|
||||
import org.hibernate.annotations.ListIndexBase;
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -30,7 +31,7 @@ public class MappedByCompositeNonAssociationTest {
|
|||
@Test void test(SessionFactoryScope scope) {
|
||||
Extensions ex = new Extensions();
|
||||
ex.exExtensionDays = 3L;
|
||||
ex.extensionId.exNo = 2L;
|
||||
ex.extensionId.exNo = 1L;
|
||||
ex.extensionId.exLoanId = 4L;
|
||||
|
||||
Loan loan = new Loan();
|
||||
|
@ -59,7 +60,7 @@ public class MappedByCompositeNonAssociationTest {
|
|||
private Long id;
|
||||
|
||||
@OneToMany(cascade = PERSIST, mappedBy = "extensionId.exLoanId")
|
||||
@OrderColumn(name = "EX_NO")
|
||||
@OrderColumn(name = "EX_NO") @ListIndexBase(1)
|
||||
private List<Extensions> extensions = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import jakarta.persistence.Id;
|
|||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OrderColumn;
|
||||
import org.hibernate.Hibernate;
|
||||
import org.hibernate.annotations.ListIndexBase;
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -28,7 +29,7 @@ public class MappedByNonAssociationTest {
|
|||
@Test void test(SessionFactoryScope scope) {
|
||||
Extensions ex = new Extensions();
|
||||
ex.exExtensionDays = 3L;
|
||||
ex.exNo = 2L;
|
||||
ex.exNo = 1L;
|
||||
ex.exLoanId = 4L;
|
||||
|
||||
Loan loan = new Loan();
|
||||
|
@ -57,7 +58,7 @@ public class MappedByNonAssociationTest {
|
|||
private Long id;
|
||||
|
||||
@OneToMany(cascade = PERSIST, mappedBy = "exLoanId")
|
||||
@OrderColumn(name = "EX_NO")
|
||||
@OrderColumn(name = "EX_NO") @ListIndexBase(1)
|
||||
private List<Extensions> extensions = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue