File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes how to lazy load @onetoOne Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "how to lazy load @onetoOne " Watch "how to lazy load @onetoOne " New topic

how to lazy load @onetoOne

srini carry
Ranch Hand

Joined: Nov 30, 2007
Posts: 83
can I lazy load @oneToOne property in hibernate ?
Vasily Kukhta

Joined: Jan 17, 2009
Posts: 23
Yes, this is possible. If you are using JPA annotation, just use this: @OneToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)

Best regards, Vasily.
wood burning stoves
subject: how to lazy load @onetoOne
Similar Threads
JQL and eager
Help understanding when to use em.find and query manager and their ability to fetch nested objects
Problem with OneToOne relationship
Heap exception while loading complete table data from database
OneToOne Lazy-load