How to map a property with formula in NHibernate?
- by yapiskan
I have a class which I want to add a property with using formula attribute.
Here is the mapping that I use in mapping file.
<property name="CurrentUserVote" type="Climate.Domain.Vote, Climate.Domain" formula="(select v from Vote v where v.AchievementId=Id and (v.IP=:CurrentUserVoteFilter.CurrentUserIP))"></property>
As you see, I want this property to be an object which refers to class that already has an nhibernate mapping. Is it possible to map a property with formula attribute to a class?
Thanks in advance.