We're updating the issue view to help you get more done. 

Unsupported SQL generated when constructors are used with predicates as arguments

Description

org.hibernate.test.hql.ASTParserLoadingTest.testBooleanPredicate fails on most databases (all except postgres and mysql) due to:

1 2 3 4 5 05:19:00,795 DEBUG QueryTranslatorImpl:237 - HQL: select new Constructor( c.id, c.id is not null, c.id = c.id, c.id + 1, concat( c.id, 'foo' ) ) from org.hibernate.test.hql.Constructor c where c.id = :id 05:19:00,795 DEBUG QueryTranslatorImpl:238 - SQL: select constructo0_.ID as col_0_0_, constructo0_.ID is not null as col_1_0_, constructo0_.ID=constructo0_.ID as col_2_0_, constructo0_.ID+1 as col_3_0_, constructo0_.ID||'foo' as col_4_0_ from Constructor constructo0_ where constructo0_.ID=? (...) 05:19:00,797 WARN SqlExceptionHelper:144 - SQL Error: 923, SQLState: 42000 05:19:00,797 ERROR SqlExceptionHelper:146 - ORA-00923: FROM keyword not found where expected

It seems that '$column=$othercolumn' and '$column is not null' predicates are not supported by these databases..

Environment

None

Status

Assignee

Brett Meyer

Reporter

Jan Martiška

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.2.10

Priority

Major