Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to avoid retrieving an OneToMany collection?

Yes, weaving is required for OneToOne and ManyToOne lazy.


Rich Livingstone wrote:
> 
> Would weaving be required for a OneToOne lazy relationship to work ? It
> relates to another thread we've been discussing for a couple of days
> 
> Thanks
> 
> Richard
> 
> 
> James Sutherland wrote:
>> 
>> If you set the fetch to LAZY the OneToMany will not be read until you
>> access it.  Ensure that you do not access the relationship in your code. 
>> Also ensure that you are using weaving (not required for OneToMany LAZY,
>> but required for ManyToOne LAZY).
>> 
>> If you never intend to read the topics, then you are better off not
>> mapping it, and just querying it.
>> 
>> 
>> 
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/How-to-avoid-retrieving-an-OneToMany-collection--tp19728719p21351076.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top