i want to use hibernate with embedded derby in a standalone application, and i have some questions:
- What jars do i need ?
- What are the necessary hibernate configuration ?
- Are there any other necessary configuration ?
- Does it have any problems/limitations with queries/criteria ?
if you can also suggest me some good tutorial for this approach that will be preferable, thanks in advance.
I use Apache Derby with Hibernate for testing one of my project’s model classes (their equals, hashCode implementations, queries, etc.). MySQL is used as the production database. I choose Derby instead of HSQLDB, because I’ve experienced some incompatibilities with Hibernate and HSQLDB, meaning, given my entities (their name, schema, keys) and their relation Hibernate couldn’t create my database schema in HSQLDB, while it could with Derby. That said, maybe I messed up something; also the incompatibilities could have been resolved.
Anyway, here is what I use in my tests (I’ve modified my
pom.xmlso that it would include Derby as a runtime dependency and run a single test, just to make sure it’s working).pom.xmlpersistence.xmlTestentityTest