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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -