Uploaded image for project: 'Hibernate ORM'
  1. HHH-9758

Broken SQL generated for dynamic batch fetching entities with a composite ID

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      When Dialect.supportsRowValueConstructorSyntaxInInList() return true, a query like the following is generated:

      select ... from B b0_ where (b0_.idPart1,b0_.idPart2) in ((?,?,(?,?)

      It should be:

      select ... from B b0_ where (b0_.idPart1,b0_.idPart2) in ((?,?),(?,?))

      When Dialect.supportsRowValueConstructorSyntaxInInList() returns false, a query like the following is generated:

      select ... from B b0_ where (b0_.idPart1 and b0_.idPart2 or b0_.idPart1 and b0_.idPart2)

      It should be:

      select ... from B b0_ where ((b0_.idPart1 = ? and b0_.idPart2 = ?) or (b0_.idPart1 = ? and b0_.idPart2 = ?))

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                gbadner Gail Badner
                Reporter:
                gbadner Gail Badner
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: