Class property problem in SQL generation

Description

The query:
[code]
from Action where parent = null order by weight
/code

Generates the following SQL:
[code]
select action0_.id as id0_, action0_.parent_id as parent2_0_, action0_.path as path0_, action0_.weight as weight0_ from action action0_ where parent is null order by weight
/code

Results in this:
[code]
Hibernate operation: could not execute query; bad SQL grammar [select action0_.id as id0_, action0_.parent_id as parent2_0_, action0_.path as path0_, action0_.weight as weight0_ from action action0_ where parent is null order by weight]; nested exception is java.sql.SQLException: Unknown column 'parent' in 'where clause'
java.sql.SQLException: Unknown column 'parent' in 'where clause'
/code

But it works ok in 3.0.5.

If it's rewrites as:
[code]
from Action a where a.parent = null order by weight
/code

it works ok, and generates this:
[code]
select action0_.id as id0_, action0_.parent_id as parent2_0_, action0_.path as path0_, action0_.weight as weight0_ from action action0_ where action0_.parent_id is null order by weight
/code

Environment

None

Assignee

Steve Ebersole

Reporter

Hugo Lopes

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure