java - Default fetch type for one-to-one, many-to-one and one-to-many in Hibernate -
What type of hibernate is the default in mapping?
What did I know after searching:
- It's curious for one-to-one.
- Lazy for one-to-many.
But after examining it in eclipse, it was eager for everyone.
Does it depend on whether I am using JPA or Hibernate?
It depends on whether you are using JPA or Hibernate or not.
, the default is:
OneToMany: LAZY ManyToOne: EAGER ManyToMany: LAZY OneToOne: EAGER
and in hibernate, all Lazy
Comments
Post a Comment