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

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 = ?))

Environment

None

Activity

Show:
Gail Badner
May 14, 2015, 9:35 PM

Closing to prepare for Hibernate ORM 4.3.10.Final release.

Gail Badner
April 30, 2015, 5:13 AM

Pushed to master as well.

Gail Badner
April 30, 2015, 12:20 AM

I've pushed the fix to 4.2 and 4.3 branches. I'm waiting for 5.0.0.Beta1 to be released before pushing to master.

Fixed

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major