Here is the preamble:
I have a SQL View and mapped NHibernate C# class
I only allowed to modify SQL View data through some stored procedures (Insert/Update/Delete)
How to denote such logic in mapping file? Is it possible with only specific mapping or i need some supplementary code?
This is described in 19.3. Custom SQL for create, update and delete
Example:
<class name="Person" table="PersonView">
<id name="id">
<generator class="guid"/>
</id>
<property name="name" not-null="true"/>
<sql-insert>exec createPerson ?, ?</sql-insert>
<sql-delete>exec deletePerson ?</sql-delete>
<sql-update>exec updatePerson ?, ?</sql-update>
</class>