Hibernate is a persistence layer for SQL databases. Many Derby users have reported both success and failure using it. This Wiki page hopes to bring together everyone's experience – feel free to edit this page.
What Works
- Hibernate + Derby + Eclipse make a great GUI.
- Spring + Hibernate + Derby – DeveloperWorks article on integrating Spring and Hibernate that uses Derby as it's data source. Includes source code for the sample application.
- DatabaseManager – Recipe for a very simple class to manage Hibernate running on top of Derby.
- Scripts Fundraising Manager – a small application that uses Hibernate on top of Derby (and the DatabaseManager).
- As of Hibernate 3.1.2, Hibernate uses TableHiLoGenerator as the "native" generator instead of IdentityGenerator. I've documented this in this JIRA on Hiberate: HHH-1915 and for derby: DERBY-1518 (fixed).
- Working with Derby and Hibernate shows how to get started.
- Hibernate's Derby dialect: org.hibernate.dialect.DerbyDialect
What Does NOT Work
When you add a problem to the list below, please be sure to include the Hibernate version.
- Hibernate Annotations do not work because Derby does not allow a unique column to be nullable. Version: hibernate-3.1beta1 and hibernate-annotations-3.1beta4
- The 'Create Schema' tool generates "bit" types, which derby does not recognize (Hibernate 3.0.5)
- The 'Create Schema' tool generates "if exists" when deleting tables, which derby does not recognize (Hibernate 3.0.5)