eclipselink oracle标识符太长ORA-00972

时间:2014-06-06 02:35:14

标签: oracle jpa jpql

JPA(EclipseLink)和Oracle数据库存在奇怪的问题。

预计会有以下JPQL:

SELECT w 
  FROM WfmStatusGroup w 
       LEFT JOIN w.statuses ws 
       LEFT JOIN ws.wfmTransList1 wt 
 WHERE wt.wfmWorkflowId = :wfmWorkflowId

但是我收到了以下错误:

  

ORA-00972:标识符太长

还在输出中生成查询。

SELECT t1.WFM_STATUS_GROUP_ID, t1.SYSTEM_ID, t1.WFM_STATUS_GROUP_DESC, 
       t1.WFM_STATUS_GROUP_NAME 
  FROM VERITECH_DEMO.WFM_STATUS_GROUP t1 
     LEFT OUTER JOIN (WFM_STATUS_GROUP_WFM_STATUS t3 
                JOIN VERITECH_DEMO.WFM_STATUS t0 
                   ON (t0.WFM_STATUS_ID = t3.statuses_WFM_STATUS_ID)) 
            ON (t3.WfmStatusGroup_WFM_STATUS_GROUP_ID = t1.WFM_STATUS_GROUP_ID) 
     LEFT OUTER JOIN (WFM_STATUS_WFM_TRANSITION t4 
                JOIN VERITECH_DEMO.WFM_TRANSITION t2 
                  ON (t2.WFM_TRANSITION_ID = t4.wfmTransList1_WFM_TRANSITION_ID)) 
            ON (t4.WfmStatus_WFM_STATUS_ID = t0.WFM_STATUS_ID) 
 WHERE (t2.WFM_WORKFLOW_ID = ?)

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

此错误表明您的字段名称或对象名称大于oracle可以处理的名称,例如,此wfmTransList1_WFM_TRANSITION_ID有31个字符,而oracle只接受30个字符名称字符。

请在此处查看此答案:Change table/column/index names size in oracle 11g or 12c