Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# pmgahan 11/6/2007 12:21 PM
Hi Martijn,

I´m trying to get the sum of a column on the database table and I get the following error:

The column attribute is not declared.

This is what I use in my hbm file:

property name="balance">
formula SELECT SUM (actt.amount) FROM cm_acc_transaction actt /formula>
/property


How would you do this?
# martijnb 11/6/2007 9:58 PM
I'm sorry, but I've never used formula's in mappings, so I have no idea what's wrong.

You could try the NH forum for a better answer.
# pmgahan 11/6/2007 11:33 PM
Hi Martijn,

I finally used hql, because this never worked.
But the problem was not the formula attribute but that I've added a column attribute to a one to one relation.

Thanks anyway!
Patrick.