org.hibernate.exception.SQLGrammarException: could not execute query

後臺信息:

330913157 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1795, SQLState: 42000
330913157 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-01795: 列表中的最大表達式數爲 1000

頁面信息:

could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute quer

原因:

在Hibernate進行Hql查詢時,Hql中的in()條件中的數目不能大於1000.導致拋出could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query異常

解決方式:

修改in中的條件數目。

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