org.hibernate.QueryException: Unmatched braces for alias path 解決方案

org.hibernate.QueryException: Unmatched braces for alias path

Caused by: org.hibernate.QueryException: Unmatched braces for alias path [insert interfaceLog(isSuccess,errorInfo,returnxml,describes,sole_id,paytime) values(‘1’,‘成功’,’{isSuccess:1,errorInfo:成功,flag:室分,irmsOrderCode:IRMS-075-181206-00026,latitude:31.0,county:奉賢,BuildingImportance:次要,requestReviewer:,BuildingFloor:30,3gCellName:測試,newSiteName:測試,requestDate:2020-01-07 08:00:00.0,requestReviewerContactWay:,BuildingProperty:多棟高層塔樓居民區,urgentDegree:緊急,longitude:122.0,siteType:室內覆蓋,orderCreator:admin,2gCellName:測試,requestOrigin:分公司,newSiteAddress:測試,userForm:高端業務,BuildingIndoorArea:1.22,irmsOrderSubject:無線規劃需求申請——室分或小區覆蓋,BuildingDepartment:浦東,importantSign:常規站點,isComplaint:是,orderCreatedAt:2018-11-08 21:43:20.0,buildingType:改造’,‘Ihome數據查詢’,‘X16110121208021’,‘2020-05-04 14:50:23’)]
at org.hibernate.loader.custom.sql.SQLQueryParser.substituteBrackets(SQLQueryParser.java:101)
at org.hibernate.loader.custom.sql.SQLQueryParser.process(SQLQueryParser.java:72)
at org.hibernate.loader.custom.sql.SQLCustomQuery.(SQLCustomQuery.java:120)
at org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl.createQueryPlan(NativeQueryInterpreterStandardImpl.java:44)
at org.hibernate.engine.query.spi.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:226)
at org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryPlan(AbstractSharedSessionContract.java:604)
at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1483)
at org.hibernate.query.internal.NativeQueryImpl.doExecuteUpdate(NativeQueryImpl.java:295)
at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1605)
… 87 more
因爲insert語句中有{括號所以會報錯,解決方案就是去掉“{”或者加上“}”使{}不出現或成對出現

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章