Forums Register Login

List query annotation ?

+Pie Number of slices to send: Send
Does Hibernate have a List annotation to load this List in the LAZY mode ? something like this



Thanks.
+Pie Number of slices to send: Send
A one-to-many can be easily mapped by using your class associations themselves. Here's an example of a Team having many Players:



The FetchType attribute can be set to EAGER, or as you seem to prefer, LAZY.

Mapping Lazy One to Many Associations with JPA (Java Persistence API)

-Cameron McKenzie
+Pie Number of slices to send: Send
The problem is Hibernate don't allow more than two EAGER at same time. Therefore most of time, we have to use LAZY. In the lazy mode, then we have to decide where to load the collection.

Thanks
Do Re Mi Fa So La Tiny Ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 783 times.
Similar Threads
SQL-Query not returning specified Object
java annotation & lazy loading
List cascade in Hibernate ?
joins in Hibernate Annotation
Printing out info from mysql database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:05:23.