The test case is in the attached zip. If you run it, it will fail. If you disable hibernate bytecode enhancement, the test succeeds.