I've run the test cases using H2 Database-1.2.127 with current trunk revision: r901901 Please refer to the attached test-results.txt file for more details.
Descriptions for the changes in attached patch:
1. H2Dictionary changes:
a) as per this issue comment: crossJoinClause = "CROSS JOIN"; requiresConditionForCrossJoin = false;
b) Return Types.BOOLEAN for Types.BIT in getPreferredType(type) because of warning message shown while running MappingTool. The message looked like this:
4396 workflow-entities WARN [main] openjpa.jdbc.Schema - Existing column "ACTIVE" on table "OPENJPA.WORKFLOW_TASK_GROUP" is incompatible with the same column in the given schema definition. Existing column:
Full Name: WORKFLOW_TASK_GROUP.ACTIVE
Not Null: false
Full Name: workflow_task_group.active
Not Null: false
c) H2 requires limit to be present for using offset. http://www.h2database.com/html/grammar.html#select
2. Changes to sql-error-state-codes.xml : added missing error-codes (caused some test failures!)
3. TestMultipleSchemaNames.java : Similar to Postgres, H2 requires schema to be created as as it does not create them automatically.
4. And in the documentation: I've changed the comment 'H2 does not support cross joins' to 'None'
But as the following test cases fail, may be it should be explained here. I'll leave it to someone with more knowledge about these failures.
a) module openjpa-peristence-jdbc -> All the tests completed successfully, except for the error in following test:
org.apache.openjpa.persistence.sequence.TestSequence => error in: testMultiThreadedNativeSequences
b) module openjpa-peristence-locking Tests run: 185, Failures: 43, Errors: 0, Skipped: 0
Hope this patch can be integrated into OpenJpa-2.0!