HHH-9062 Fix failing tests
This commit is contained in:
parent
6c1db681fe
commit
dd8f1a31a7
|
@ -496,7 +496,7 @@ public class ValidityAuditStrategy implements AuditStrategy {
|
||||||
if ( configuration.isRevisionEndTimestampEnabled() && !configuration.isRevisionEndTimestampUseLegacyPlacement() ) {
|
if ( configuration.isRevisionEndTimestampEnabled() && !configuration.isRevisionEndTimestampUseLegacyPlacement() ) {
|
||||||
if ( entity instanceof JoinedSubclassEntityPersister ) {
|
if ( entity instanceof JoinedSubclassEntityPersister ) {
|
||||||
// iterate subclasses, excluding root
|
// iterate subclasses, excluding root
|
||||||
while ( entity.getEntityMetamodel().getSuperclass() != null ) {
|
while ( entity.getMappedSuperclass() != null ) {
|
||||||
contexts.add(
|
contexts.add(
|
||||||
getNonRootUpdateContext(
|
getNonRootUpdateContext(
|
||||||
entityName,
|
entityName,
|
||||||
|
@ -566,8 +566,8 @@ public class ValidityAuditStrategy implements AuditStrategy {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply "WHERE (entity_id) = ?"
|
// Apply "WHERE (entity_id) = ?"
|
||||||
context.addPrimaryKeyColumns( entity.getIdentifierColumnNames() );
|
context.addPrimaryKeyColumns( rootEntity.getIdentifierColumnNames() );
|
||||||
context.bind( id, entity.getIdentifierType() );
|
context.bind( id, rootEntity.getIdentifierType() );
|
||||||
|
|
||||||
// Apply "AND REV <> ?"
|
// Apply "AND REV <> ?"
|
||||||
final String path = configuration.getRevisionNumberPath();
|
final String path = configuration.getRevisionNumberPath();
|
||||||
|
@ -630,8 +630,6 @@ public class ValidityAuditStrategy implements AuditStrategy {
|
||||||
// Apply "AND REVEND_TSTMP is null"
|
// Apply "AND REVEND_TSTMP is null"
|
||||||
context.addWhereColumn( auditEntity.toColumns( revEndTimestampColumnName )[ 0 ], " is null" );
|
context.addWhereColumn( auditEntity.toColumns( revEndTimestampColumnName )[ 0 ], " is null" );
|
||||||
|
|
||||||
session.createQuery( "From " + auditEntityName + " WHERE originalId.REV.id <> " + revisionNumber ).list();
|
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue