0
SELECT
CONCAT(CREG.FIRSTNAME, ' ', CREG.LASTNAME) AS NAME,
CASE WHEN CR.CAMPAIGNTYPE = 'NPS'
THEN NPSSCORE
ELSE CSATSCORE END AS SCORE,
IFNULL(cast(CC.TEXT AS CHAR(255)), '') AS COMMENTS,
CREG.ID AS CLIENTID,
CR.ID AS CAMPAIGNRESPONSEID,
CI.ID AS ISSUEID
FROM CUSTOMER_ISSUES CI INNER JOIN (SELECT DISTINCT ISSUEID
FROM ISSUE_DEPARTMENT_MAPPING
WHERE CUSTOMERUSERID = 91 AND ISSUE_STATUS = 'New') IDM
ON CAST(CI.FEEDBACK_DATE AS DATE) BETWEEN '2016-06-05' AND '2016-06-11' AND IDM.ISSUEID = CI.ID
INNER JOIN CAMPAIGN_RESPONSE CR ON CR.ID = CI.CAMPAIGN_RESPONSE_ID
INNER JOIN CLIENT_REGISTRATION CREG ON CREG.ID = CR.RESPONSECUSTOMERID
LEFT OUTER JOIN CAMPAIGN_COMMENTS CC ON CC.CAMPAIGN_RESPONSE_ID = CR.ID;
上述查詢正常運行在mysql控制檯中,但是當我與Hibernate集成時,Hibernate會引發以下錯誤。無法從休眠狀態的結果集中讀取列值Native Query
[BigIntegerType]無法從結果集中讀取列值:ID;未找到列'ID'。
集'show_sql = TRUE'獲得印刷日誌/控制檯上的SQL,檢查它是否運行良好在mysql-console中。你如何綁定參數?還發布完整的堆棧跟蹤 – Saravana