hi
I am new to Hibernate and have just got a grasp of the basics...
I have added the following tag to my Event.hbm.xml
Code:
<property name="sum"
formula="(select sum(uid) from Events)"/>
and I have added the sum getter an setter methods. but i always get an error
Quote:
WARN - SQL Error: 0, SQLState: 42803
ERROR - ERROR: column "event0_.uid" must appear in the GROUP BY clause or be used in an aggregate function
which could be because I am already executing a query
Code:
"List result = session.createQuery("from Event").list();"
how do i get around this error and get get the sum from the query in the property tag
thnx for any help
jubs