Custom schema generation with Hibernate annotations
Hibernate 3 annotations are a great way to persist your domain model in a database backend. It's quite easy to have Hibernate generate or update the database schema as required, and not have to hand-code SQL scripts at all. However, this approach often hits a few hurdles when it reaches the DBA teams - they usually insist on obscure and archaic naming conventions, and sometimes even want to see the SQL script before modifying the producton database!
Luckly, you don't have to go back to the bad old ways of hand-coded SQL and convoluted XML mappings just yet - Hibernate annotations can cope with all this. For those interested, I've written up some details on how to do, including a few pit-traps to avoid, in new article on Javaworld.