Wrong sql generated when both key() and value() function exists in where.

Description

I have entity like this:

will generate table like this:

core_user(id,username);
core_user_extra(user_id,name,value);


when search user use JPQL:

Hibernate generate wrong sql:

I think the right sql may be

And EclipseLink generate sql as I expected.

Environment

JAVA7 Spring 3.1 Windows

Assignee

Unassigned

Reporter

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure