Details
-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
7.1.1.Final
-
None
Description
When doing a count on a class mapped as EmbeddedId with multiple Id's the generated sql will fail on several db's (tested on MySQL/MariaDB) since hibernate generate a count sql containing all the id's.
Hibernate creates a different (correct) sql on classes mapped with IdClass and multiple Id's.
A simple test that verify the difference between the two:
https://github.com/stalep/hibernate-orm/commit/54911765de7981ec9a2318fc9928be68ff37bab3