Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of difficulties you've faced with Hibernate [closed]

Tags:

java

hibernate

As any other framework Hibernate impose some restrictions. One of a very popular interview questions is:

"What kind of difficulties you've faced with Hibernate?"

For instance:

  1. Lazy one-2-one bidirectional is impossible.
  2. Lazy collection loading after session close. That happens when you use DAO + Spring transactions. You can read here about it.
  3. Troubles with concurrent update on clustered application
  4. N + 1 selecting problem

Question: may you supplement this humble list please?

P.S. I don't mean those difficulties when you are newcomer in Hibernate and don't now how to map many-2-many. I mean those difficulties that faced every experienced programmer while using this framework.

like image 988
VB_ Avatar asked Nov 11 '22 08:11

VB_


1 Answers

I would add :

  • Managing the session lifecycle and transaction demarcation (particulary with RIA apps using long-conversation scope which cannot be managed by the container)
  • collection management and performance (Collection mapping)
  • The JPA hashCode() / equals() dilemma
like image 69
Gab Avatar answered Nov 14 '22 23:11

Gab