By ganeshread
via gmarwaha.com
Published: Mar 01 2010 / 15:24
Now, when you insert an instance of User into the database, while specifying all null values for Address’s fields maybe because the user didn’t give his address, then what would you expect in return at some point in time when you retrieve this User back from the database.



Comments
michele.mauro replied ago:
Hibernate behaves as documented, but the user thought it would behave differently, and remains surprised. So what?
It's easy to be surprised if you don't read the documentation and start with false assumptions about a (quite complex) framework as Hibernate...
amalter replied ago:
The problem is how complex it is. A good framework follows (as I assume the poster is alluding to), the principle of 'least surprise'
A great framework does what you expect.
Hibernate is approaching a critical mass of functionality and layering where the complexity budget is just too high for anyone not already intimate.
It's hard to disagree with the statement - "Hibernate always surprises"
ddelponte replied ago:
I've found that GORM really makes hibernate easy to use
http://www.grails.org/GORM
Voters For This Link (35)
Voters Against This Link (7)