You could use event listeners to calculate these values going in/out of the db and skip the formula altogether.
On Aug 11, 2:01 am, Wildjoe182 <[email protected]> wrote: > In NHibernate, is it possible to have a formula column which queries > using said formula, but still have the column mapped to an actual > column name so that I can update and insert the actual column value in > the database? > > Something like: > <property name="UnitType" insert="true" update="true" formula="CASE > WHEN [type] in ('U', 'P') THEN [type] ELSE NULL END" > type="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089""> > <column name="type" not-null="false" /> > </property> > > The common excuses apply: Bad legacy database; can't change data; > can't add constraints, can't... > > Regards, > > Joe -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
