79103701

Date: 2024-10-18 21:21:29
Score: 1.5
Natty:
Report link

Today I have a issue similar at this post.

My scenario was

A parent entity class with @Inheritance strategy Joined. This parent class have got a OneToMany Set children with cascade All and orphanremoval at true.

The child class extends parent class with a common id to discrimination join

The objective is to save a child class entity cleanly without problem.

Well, the assert is a fail, the error was an hibernate orphanremoval null etc etc.

After various tests on junit I realize that the save work it only if the list of children on parent class must been initialized with an empty list.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Inheritance
  • Low reputation (0.5):
Posted by: Alessandro Modica