Advanced Hibernate training Pt. I
Published by peter March 14th, 2007 in java.Today was the first day of the two-day Hibernate Advanced (H267) training which I’m attending. Most of the stuff discussed isn’t new to me, but hearing explanations of certain side effects by one of the Hibernate gurus (Christian Bauer, (co)author of Java Persistence with Hibernate and Hibernate in Action) is actually a really nice way of deepening my Hibernate knowledge.
Today we covered the following topics:
- Advance class and property mappings
- Associations and collections
- Transactional processing
- Cascading
- The hibernate session
- Exception handling
After the session I asked how the ‘association oddity’ I recently blogged about was to be seen. After looking at the query I presented Christian explained that I was doing something quite horrible (as to be expected ;)). The result of that specific query would be a cartesian (every row of each table is joined to every row in the other table) join
of the tables mentioned in the join clause. A small test which I wrote seems to confirm this. It doesn’t however explain how this could deliver better performance. I’ll have to look into the resultset of the generated query to be 100% sure.
Another interesting aspect of todays training was the fact that Christian really doesn’t seam to see any reason to use Spring AT ALL. I partially agree about the remarks he made on the amount of XML coming with Spring, and the fact that Spring swallows the exceptions thrown by Hibernate. I do however still really the way Spring helps developers in building a loosely coupled system.
Tomorrow we’ll be going in-depth on various topics like fetching strategies, versioning, performance tuning and caching … can’t wait! And oh, we’ll surely see some Seam magic tomorrow.




















0 Responses to “Advanced Hibernate training Pt. I”
Please Wait
Leave a Reply