Wildjoe182
unread,Aug 11, 2011, 2:01:28 AM8/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
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