remove collection with delete-orphan not work with null assignment? :(

后端 未结 2 411
情话喂你
情话喂你 2021-01-03 01:21

I am having problems removing another entity through cascade delete-orphan. It works when I clear the associated set collection, but not when I make the set collection null.

2条回答
  •  温柔的废话
    2021-01-03 01:28

    In the version 5 of Hibernate the problem is very similar but an exception is thrown instead: "A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance". To tackle that I had to switch from null values to empty collections.

    The issue in Hibernate is posted here: https://hibernate.atlassian.net/browse/HHH-9940

提交回复
热议问题