求教别名异常Every derived table must have its own alias
控制台:
···getList HQL==from Temp where username=? and password=?
Hibernate: select * from ( select temp0_.ID as ID0_, temp0_.usname as usname0_, temp0_.paword as paword0_ from temp temp0_ where temp0_.usname=? and temp0_.paword=? ) where rownum <= ?
2011-06-30 15:28:14,402 ERROR (org.hibernate.util.JDBCExceptionReporter:78) - Every derived table must have its own aliasloadPOJP is error
org.hibernate.exception.SQLGrammarException: could not execute query
···
项目本来一直是用oracle数据库的,也没出现过什么问题,现在我用mysql,建了个表顺便一测试就报莫名其妙的异常,悲剧!框架继承的Dao类应该是没问题的,但现在异常却报在Dao类里~~~~
同样的hibernate语句如果是返回List对象是不会报异常,但返回单个对象就报上面的异常,
不知道有朋友遇到过相同的问题没有?
hibernate语句很简单,不是语法错误,有朋友说是框架和mysql的版本问题~~~~