This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I'm currently trying to establish a test harness for a legacy system backed by SQL Server. I want to use a lightweight in-memory DB to be able to run unit tests quickly and without messing with an entire server-based test DB. I am creating different maven profiles for development, test and production. The legacy system uses TopLink and standard JPA as the ORM-tool.
The problem is that I can't get any of the in-memory DBs to support GenerationType.IDENTITY for the ID column. This is used without problems in the live SQL Server DB.
Both HSQLDB and H2 fails with IDENTITY. Error:
AUTO works fine for H2, but not when switching back to SQL Server again.
I have tried different implementations of the H2Platform as suggested here with no luck.
Apache Derby seems to have a limit of 18 characters for naming constraints during creation of the DB. This lead to a lot of duplicate constraint names, so no go there..
All DBs are latest version available in Maven Central July 21 2011.
Does anyone have tips for where to go next?
- Will switching to Hibernate or EclipseLink help?
- Are there other alternatives I should try?