我试图在CAST
查询中使用JPQL
函数将数据类型从Integer转换为String。但是我得到QuerySyntaxException
。
JPQL查询
@Query("select a from Alerts as a "
+ "Inner Join RoomTransfer as rt ON a.salertActionData= cast (rt.nTransId character varying)"
+ " where a.nalertId=?1")
public List<Alerts> transferedDetailsByAlertId(Integer nalert_id );
错误
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: expecting CLOSE, found 'varying' near line 1
有人可以告诉我我在做什么错吗?
答案 0 :(得分:0)