I use a view to map a relation between SomeClass and OtherClass, the problem comes when I want to delete an instance of SomeClass.
I have this kind of mapping:
Code:
<class name="SomeClass"
table="dbp_asset"
dynamic-update="false">
<set name="immutableList" table="aView" cascade="none" mutable="false" >
<key column="id" on-delete="noaction" update="true"></key>
<many-to-many column="org_id" class="OtherClass" fetch="select" outer-join="false" />
</set>
</someClass>
but every time I try to delete a SomeClass instance hibernate throws me this exception:
Caused by: java.sql.BatchUpdateException: View or function 'aView' is not updatable because the modification affects multiple base tables.
I really stuck there so I'll appreciate any help anyone could give