I have a question about the behavior of persist and merge when there are 1 to many high level dependency relationships, let’s say I have an entity called “cinema” and its children are the “movie theater”, when I update the cinema (I do a merge) for example its income increased, but at the same time a new movie theater was created, an object that I create and as I am creating it I link it to its parent entity (“cinema”) and I create it (I do persist), then I execute the flush and the commit, the cinema changes are updated but the new movie theater entity is not, what is the reason for this? Is it some particularity of the use of persist that is overwritten when doing a merge?
I must clarify that this does not happen when I do a merge to the parent entity and the merge is also received by the child entity by cascade and during its management I do not persist