[quote="amila733"]Hi
ok Gopal , Actually I didn't test it.
You can do it like this.
in your mapping file you can define a property for a formula
Code:
<property
name="formulaField"
type="java.lang.String"
update="true"
insert="true"
formula="avg((totalScore/maxScore)*100"
precision="7"
scale="2"
/>
Select formulaField from XBean
Hi Amila,
Sorry for late reply. I tried the same suggested by you. i am not getting precision set. I also tried with length attribute. but This is not working. Is There not a way to set this in the query itself ?
Thanks,
Gopal