Skip to main content



      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 05:57 Go to next message
Eclipse UserFriend
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: Mon, 15 April 2019 21:35] by Moderator

Re: unidirection @OneToOne+FetchType.LAZY not working [message #1805885 is a reply to message #1805352] Fri, 26 April 2019 10:17 Go to previous message
Eclipse UserFriend
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: Fri Jun 13 04:22:43 EDT 2025

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

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

Back to the top