Hibernate Tips
Jason Carreira has posted 15 tips on using Hibernate on his website. If you are a Hibernate user, or, like me are starting to use it, then you should check out this article. Here is a small sampling of what he has on his site:
4. Define the flush strategy early : let Hibernate auto-flush vs. defining your own synchronization points where you flush to the database.
9. Use optimistic concurrency with a version column if possible. Timestamps work too, but not as cleanly. Avoid making Hibernate examine all values to determine if records have changed.
11. Set your IDE up with a reference to the Hibernate source code of the distribution you are using so you can trace into it. Not only will it help you understand what’s causing the behavior you’re seeing, but it will help you understand how Hibernate works.