hibernate formula dosenot allow user < in select for example i use this formula and get this exception

  <property name="debitPrice"  not-null="true"   formula="(  select nvl(sum(d.cost_price),0) from ihs_flat_cost_assign d where d.flat_id=Id  and d.cost_price <=0   )  "   />

 

and i change that to this

        <property name="debitPrice"  not-null="true"   formula="(  select nvl(sum(d.cost_price),0) from ihs_flat_cost_assign d where d.flat_id=Id  and 0>=d.cost_price    )  "   />

and problem solve

crazyyyyy bug i dont know whyyyyy