select distinct po from FsSdrInitreport po left join po.initsystemList pos where  po.deleted='0' and po.submitdeptpk = :submitdeptpk  order by pos.majorsystem
[07-7-2 9:54:04:251 CST] 1ed91ed9 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter  SQL Error: 1791, SQLState: 42000
[07-7-2 9:54:04:251 CST] 1ed91ed9 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter  ORA-01791: not a SELECTed expression[07-7-2 9:54:04:267 CST] 1ed91ed9 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter  SQL Error: 1791, SQLState: 42000
[07-7-2 9:54:04:267 CST] 1ed91ed9 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter  ORA-01791: not a SELECTed expression
上面的语句到底有什么毛病啊,排序条件在子表就不能用 distinct么?
表的关系是一对多!!!!
高手帮忙啊!!!!!!!