The sequence generation of IDs for @Id @GeneratedValue(strategy = GenerationType.AUTO) is different in AS7 than in AS6 when using H2 embedded driver and the standard datasource ExampleDS.
I have been using H2 in AS6 for while and all my test cases fails because the IDs are sequenced across tables and not per table. So when an ID is asserted for in my test case, it fails.
I know that the AUTO id generation strategy is up to the capability of the driver, however I find it dubious that H2 driver is not capable of generating an ID per table. This worked fine with H2 driver in AS6. Another consequence of this, I cannot run the same test cases using MySQL since the id sequence generation differs.
This issue has also been posted on the AS7 User Forum and I hope the Hibernate team would be able to provide a comment/solution to this problem.
http://community.jboss.org/thread/170623?tstart=0Ove