How to map a property with formula in NHibernate?
Posted
by yapiskan
on Stack Overflow
See other posts from Stack Overflow
or by yapiskan
Published on 2010-03-08T19:03:37Z
Indexed on
2010/03/08
19:06 UTC
Read the original article
Hit count: 783
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.
© Stack Overflow or respective owner