TYPE should be a valid attribute of an entity for a custom query.
See #3062, #3056.
This commit is contained in:
@@ -604,6 +604,7 @@ identification_variable
|
||||
| OUTER
|
||||
| FLOOR
|
||||
| SIGN
|
||||
| TYPE
|
||||
| VALUE)
|
||||
;
|
||||
|
||||
|
||||
@@ -1549,4 +1549,11 @@ class HqlQueryRendererTests {
|
||||
void escapeClauseShouldWork() {
|
||||
assertQuery("select t.name from SomeDbo t where t.name LIKE :name escape '\\\\'");
|
||||
}
|
||||
|
||||
@Test // GH-3062, GH-3056
|
||||
void typeShouldBeAValidParameter() {
|
||||
|
||||
assertQuery("select e from Employee e where e.type = :_type");
|
||||
assertQuery("select te from TestEntity te where te.type = :type");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -941,4 +941,11 @@ class JpqlQueryRendererTests {
|
||||
void queryWithValueShouldWork() {
|
||||
assertQuery("select t.value from TestEntity t");
|
||||
}
|
||||
|
||||
@Test // GH-3062, GH-3056
|
||||
void typeShouldBeAValidParameter() {
|
||||
|
||||
assertQuery("select e from Employee e where e.type = :_type");
|
||||
assertQuery("select te from TestEntity te where te.type = :type");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user