Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] eager as default for @xxxToOne

Yes, that was pretty much it. If all relationship attribute retrieval was free then they might all have defaulted to being eager, but it was just about drawing a line where the cost-benefit made sense. We considered having a global option that would allow setting/overriding the default for all attributes of a given type but never got around to spec'ing that out.

-Mike

On 29/12/2014 12:34 PM, Hebert Coelho wrote:
Hello Yannick,

My guess is that to bring a *One relationship from the database is because it is a "cheap" behavior. Usually it will not overhead the processor or the network.

But this is my guess, I believe that some of the JPA creators could answer that better.

Regards

On 12/29/2014 03:18 PM, Yannick Majoros wrote:

Hello Hebert,

Thanks for your answer. The discussion I've been involved in our why this is the default, as stated by the spec. Is this just for historical reasons. And if it isn't, what is the reasoning behind that?

Thanks,

Yannick


Le lun. 29 déc. 2014 14:17, Hebert Coelho <hebolive@xxxxxxxxx> a écrit :
Hello Yannick,

Because it is written in the spec. (:





Take a look at the spec in the section 11.1 that details the annotations and its defaults.



On 12/28/2014 06:54 PM, Yannick Majoros wrote:
Hello,

As a reaction to http://java.dzone.com/articles/eager-fetching-code-smell , could someone explain why EAGER is the default fetch type for @xxxToOne relations?

Thanks,

Yannick Majoros
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top