Fix delete of entity with plural attributes
This commit is contained in:
parent
afb9f9770d
commit
6a403fa5d9
|
@ -91,6 +91,8 @@ public class DelayedCollectionAssembler implements DomainResultAssembler {
|
|||
fetchedMapping.getCollectionDescriptor(),
|
||||
parentAccess.getParentKey()
|
||||
);
|
||||
|
||||
parentAccess.registerResolutionListener( owner -> instance.setOwner( owner ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -137,6 +139,7 @@ public class DelayedCollectionAssembler implements DomainResultAssembler {
|
|||
|
||||
@Override
|
||||
public void finishUpRow(RowProcessingState rowProcessingState) {
|
||||
|
||||
collectionKey = null;
|
||||
instance = null;
|
||||
}
|
||||
|
|
|
@ -87,11 +87,6 @@ public class MapOperationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected(
|
||||
reason = "As noted in `#dropData` there is a problem with @ElementCollections not be handled properly " +
|
||||
"for cascade; `org.hibernate.tuple.NonIdentifierAttribute#getCascadeStyle` returns CascadeStyles.NONE " +
|
||||
"which leads to `EntityPersister#hasCascades` to report false which leads to Cascades skipping it"
|
||||
)
|
||||
public void testDelete(SessionFactoryScope scope) {
|
||||
scope.inTransaction(
|
||||
session -> {
|
||||
|
|
|
@ -110,7 +110,6 @@ public class SetOperationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected( reason = "FlushVisitor collection handling" )
|
||||
public void testDeleteWithElementCollectionData(SessionFactoryScope scope) {
|
||||
scope.inTransaction(
|
||||
session -> {
|
||||
|
|
Loading…
Reference in New Issue