Skip to content

Unexpected token in HQL Update @Query when base package name starts with an SQL Keyword [DATAJPA-659] #1037

@spring-projects-issues

Description

@spring-projects-issues

Chinmay Shah opened DATAJPA-659 and commented

Here's my query which is failing validation -

@Modifying
@Query("update ENTITYCLASSXXXXXXXXXXXXXXXXXXXXXXXX smpb set smpb.active = :active where smpb.sx1 = :sx1 and smpb.sx2 = :sx2")
void updateXXX(@Param("sx1") String sx1, @Param("sx2") Integer sx2, @Param("active") Boolean active);

Here's the reason:

16 Jan 2015 21:09:57,824 ERROR: org.hibernate.hql.internal.ast.ErrorCounter - line 1:8: unexpected token: in
16 Jan 2015 21:09:57,825 ERROR: org.hibernate.hql.internal.ast.ErrorCounter - line 1:8: unexpected token: in
line 1:8: unexpected token: in
	at org.hibernate.hql.internal.antlr.HqlBaseParser.updateStatement(HqlBaseParser.java:239)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:169)

Attachments:

Metadata

Metadata

Assignees

Labels

status: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions