Hi,
how to parametrize computed property mapping?
I have in mapping computed property realized as formula(sql) and need to parametrize it:
Code:
<hibernate-mapping>
<class name="cz.mikros.w4sn.model.domain.obec.Okres" table="OKRES">
...
<property name="name" column="NAME"/>
<property name="xxMaxInActualMonth" formula="
(select MAX(X.FIELD)
from PROSTOR X
where X.OKRES_ID = ID AND X.MONTH = :actualMonth) "
/>
</class>
</hibernate-mapping>
Parameter :actualMonth will I set from java-code. Mapping above is incorrect, I dont know how "parametrize" formula-query.
Can you suggest me?
Thanks,
Jara