Hi Martijn,
I've given more thought to this, and even when the optional=true is
supplied and Hibernate knows there cannot be a null FK on the child-side,
the Persistence Context still needs the child identifier.
Once an entity is managed even if it is a Proxy and not an actual entity,
Hibernate ne
You just ran into a long standing bug with Hibernate, reported over 5 years ago:
https://hibernate.atlassian.net/browse/HHH-3930
Martijn
On Fri, Jan 8, 2016 at 4:08 PM, Vlad Mihalcea wrote:
> Hi,
>
> I remember that for a bidirectional @OneToOne relationship, the optional =
> false attribute c
Depending on exactly how you are testing that, that sounds like a bug. Are
you (inadvertently) using bytecode enhancement?
On Fri, Jan 8, 2016 at 9:09 AM Vlad Mihalcea
wrote:
> Hi,
>
> I remember that for a bidirectional @OneToOne relationship, the optional =
> false attribute could instruct H
Hi,
I remember that for a bidirectional @OneToOne relationship, the optional =
false attribute could instruct Hibernate to always generate a Proxy
(because this association cannot be null),
so, if the fetch is LAZY, it would not generate a secondary query upon
fetching the parent-side entity.
I t