What would be your approach with NHibernate to do the following:
When Comment
is inserted into DB, and its property Text
is inserted into column Text
(due to a mapping), insert into column TextHash
a hash of this property value.
It seems trivial if I map TextHash
, but how should I do this without mapping it?
I do not need it in the domain model, its a DB-level optimization (I would use computed HashBytes if not for the length limit).