hibernate - Error SQL 979 with the group by -
i have problem java ee/hibernate application. query works in unit test, not in application.
    <named-query name="list.vacant.accessory">         <query>select proty, count(acc.id)                 producttype proty, accessory acc                  left join acc.producthistorylist phl                 phl.status 'en stock atos'                 , proty.id = acc.producttype.id                    , phl.statusdate = (select max(statusdate)                                        producthistory ph                                       ph.product=phl.product)                                                        group proty                             </query>     </named-query>    i have error : sql error: 979, sqlstate: 42000
ora-00979: not expression group by
have idea ? thanks.
i don't know hibernate mapping. purely query stand point:
 select proty, count(acc.id)             producttype proty, accessory acc              left join acc.producthistorylist phl   here proty referring table / entity , grouping table name? shouldn't there column name? proty.column?
Comments
Post a Comment