Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » unidirection @OneToOne+FetchType.LAZY not working(using unidirection @OneToOne with FetchType.LAZY , but found it not woking)
unidirection @OneToOne+FetchType.LAZY not working [message #1805352] Fri, 12 April 2019 09:57 Go to next message
Evan Huang is currently offline Evan HuangFriend
Messages: 1
Registered: April 2019
Junior Member
Hi,
I have got some problem with this when I try using unidirectional @OneToOne and FetchType = Lazy like a blow , the result is unexpected
Order table:
@OneToOne(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name="ORDER_DETAIL_ID")
private OrderDetail orderDetail;

after I query the data of Order, OrderDatil's data query auto. Does anyone know this issue? or is there any example?

Thanks a lot

[Updated on: Tue, 16 April 2019 01:35]

Report message to a moderator

Re: unidirection @OneToOne+FetchType.LAZY not working [message #1805885 is a reply to message #1805352] Fri, 26 April 2019 14:17 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1330
Registered: July 2009
Senior Member
Not sure exactly what you mean, are you saying that lazy on a OneToOne and other non-collection type mappings isn't working, or is it only this one uni-directional oneToOne mapping? Is the query happening while the order instance is being built and before it is returned from the query, or is something triggering it after?

First guess is that you might not have enabled weaving/bytecode enhancement which is required for lazy non-collection type mappings. See https://www.eclipse.org/eclipselink/documentation/2.4/concepts/app_dev007.htm for details.
Previous Topic:Why delete operation ignore the tenant discriminator?
Next Topic:EclipseLink 2.7.4 and dependency jakarta.persistence signing problem
Goto Forum:
  


Current Time: Thu Oct 24 05:07:55 GMT 2019

Powered by FUDForum. Page generated in 0.01933 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top