When that's removed, the EntityKey de-serialization logic can be simplified a lot applying: https://github.com/Sanne/hibernate-orm/commit/3a039a38ad27154835ba3a83c80a7a315d01a2ad