Unnecessary initialization of lazy collection on PERSIST cascade
Description
Activity

Jan-Oliver LustigFebruary 26, 2025 at 4:51 PM
Hello ,
Sebastian was a ‘working student’ at our company some years ago. One of his tasks was to contribute some of the Patches I had made to hibernate for our product. Unfortunately I do not know how to reach him now. But I can assure you that I am the author.
Greetings
Steve EbersoleFebruary 26, 2025 at 4:38 PM
Actually I just re-read your comment. I had misread it before.
We’d actually prefer to have reply himself. We’ve tried reaching out to him but have never heard a reply.
Steve EbersoleFebruary 26, 2025 at 4:05 PM
Thanks ! Appreciate it

Jan-Oliver LustigFebruary 26, 2025 at 3:52 PM
Dear
Thank you, I am doing well, I hope you are too!
The change in License to ASL2 would be ok with me. In our product we are already using some other open source libraries under ASL2.
I can speak for my collegue as well regarding this matter.
I wish you good luck for the task at hand and the hibernate project in general.
Best regards, Jan-Oliver
Steve EbersoleFebruary 26, 2025 at 2:39 PM
Hello ,
Hope you are doing well.
I'm going to need your help with a copyright matter: we’re exploring the possibility of changing the license of all Hibernate projects to Apache Software License v2 (ASL2). You both authored various contributions to our projects, some of which are currently licensed as LGPL2.1; I would love to have your explicit permission so that we might proceed with this change without further delays.
Could you reply here and state that you agree to make all your contributions available under the ASL2?
The terms of the ASL2 can be found here: https://apache.org/licenses/LICENSE-2.0.
Also, if you have objections, please let me know. The Hibernate team believes that the ASL2 license would be more suitable for the future of our projects as it’s become more common and widely accepted; we think that in spirit and intent, it’s not a significant change, but would resolve some concerns that users have occasionally raised.
Please note that we’re not sure yet if we’ll be able to do this; I merely hope we can make it happen.
Thanks!
When a PERSIST cascade hits an uninitialized PersistentCollection (PC) on a lazy property, the PC always gets initialized.
This happens even if there are no 'queued actions' associated with the PC.
This seems unnecessary since no potential changes may have been performed on the uninitialized PC or the unloaded Elements.
We noticed this when hunting down superflous SELECT-Statements in the context of performance issues.
Testcase and possible solution will be attached soon