I'm having some problems creating computed properties using the FORMULA attribute of the Property element.
I have the following class:
Code:
<class name="ObjectModel.Asset.AssetBase, ObjectModel" table="Asset_AssetBase">
..........
<property name="ExpiryDate" column="ExpiryDate" type="DateTime" />
<property name="IsAlive" formula="(CASE WHEN ExpiryDate IS NULL THEN 1 ELSE 0 END)" type="Boolean" />
but NHibernate translates it by the query
Code:
([this_1_].CASE [this_1_].WHEN [this_1_].ExpiryDate IS NULL [this_1_].THEN 1 [this_1_].ELSE 0 [this_1_].END) as f0_4_,
Any suggestions to solve the problem?
Antonella
Hibernate version: 1.0.4