[hibernate-dev] Question regarding the JPA 1.0 decision of making ToOne associations as EAGER
Vlad Mihalcea
mihalcea.vlad at gmail.com
Sun Feb 28 12:40:49 EST 2016
Thanks,
Rhe only reason I found is this paragraph:
"The EAGER default for OneToOne and ManyToOne is for implementation reasons
(more difficult to implement), not because it is a good idea. Technically
in JPA LAZY is just a hint, and a JPA provider is not required to support
it, however in reality all main JPA providers support it, and they would be
pretty useless if they did not."
https://en.wikibooks.org/wiki/Java_Persistence/Relationships#Lazy_Fetching
Vlad
On Sun, Feb 28, 2016 at 7:08 PM, Steve Ebersole <steve at hibernate.org> wrote:
> The Hibernate team argued against this, but we were outvoted. So... sorry
> I cannot "justify it" ;)
>
> Obviously as our previous default shows we believe the associations should
> be lazy by default.
>
>
> On Sun, Feb 28, 2016 at 11:00 AM Vlad Mihalcea <mihalcea.vlad at gmail.com>
> wrote:
>
>> Hi,
>>
>>
>> Do you remember why the JPA User Group decided to make the ManyToOne and
>> the OneToOne associations EAGER by default?
>>
>> In Hibernate 3.x, these associations used to be LAZY, so there must have
>> been a reason for taking this decision.
>>
>>
>> Thanks,
>>
>> Vlad
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
More information about the hibernate-dev
mailing list