im using the Fluent NHibernate together with the automapping functionality!
I'm currently using the follwing mapping statement to prevent autogenerated column values to be updated / insert
.Override<Entity>(map => map.Map(d => d.STATUS).Not.Insert().Not.Update())
It works fine so far, but now im looking for a way to get this solved more dynamically.
What i would like to do is:
I want to declare a custom attribute called [ReadOnlyDbField] and then declare all properties of the entity with this custom attribute to say: Just read this value and do not update / insert it.
Then i want to tell the mapping configuration:
Map all properties with the custom attribute [ReadOnlyDbField] to Not.Insert().Not.Update()
Is there a way to get this?
Thanks
Daniel