一句HQL语句,"select module from Log group by ?"
然后设置?的值
但是执行的时候报错
15006 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 979, SQLState: 42000
15007 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00979: 不是 GROUP BY 表达式
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select log0_.MODULE as col_0_0_ from T_LOG log0_ group by ?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
难道group by不能使用?么,还有什么其他的解决方法
hql java sql group?by
------解决方案--------------------
"select module from Log group by module,?"
这个module要加上
------解决方案--------------------
+1只能用module