Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4135

Count query on classes mapped as EmbeddedId with multiple Id's fail to execute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 7.1.1.Final
    • JPA / Hibernate
    • None

      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

            smarlow1@redhat.com Scott Marlow
            spederse@redhat.com Stale Pedersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: