Hibernate version:3.0.5
Name and version of the database you are using: SQL Server 2000
Hello,
I have a many-to-many assocation that utilizes a view for the cross-reference table.... something like this (short version)...
<class name="MyClass">
<set name="myCollection" table="my_view" cascade="none" lazy="true"...>...</set>
</class>
Whenever I try to update (session.saveOrUpdate()) an instance of MyClass, I get the error you see below.
What do I need to do to make Hibernate see the collection as read-only? I have set cascade="none".
Is there something else I can do?
Code:
org.hibernate.util.JDBCExceptionReporter: View or function 'v_myview' is not updatable because the modification affects multiple base tables.
org.hibernate.event.def.AbstractFlushingEventListener: Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not delete collection: myCollection#1]