java - Hibernate GROUP BY invalid for Oracle -
i created hibernate query this:
select new projectforuser (p.projectid, p.name, p.description, p.client, p.startdate, p.enddate, p.livedate, p.projectstate, p.overallragstatus, p.scoperagstatus, p.flt, up.projectmanager) userprojectassociation left join up.project p up.user.id = :userid , up.project.projectstate != 'archived' group p.projectid
to retrieve projects user. projects stored in 1 table, users in other , userprojectassociation joining table additional attribute - projectmanager.
the whole query works fine h2 database, on oracle error:
ora-00979: not group expression
what correct way use group oracle?
thanks!
the problem. ora-00979 occurs when group clause not contain expressions in select clause. select expression not included in group function must listed in group clause. these avg, count, max, min, sum, stddev, , variance.
see: https://www.tekstream.com/resources/ora-00979-not-a-group-by-expression/
Comments
Post a Comment