I have a object with read-only cache, but initialy I want to write it via hibernate. That is not possible, because it throws an exception:
java.lang.UnsupportedOperationException: Can't write to a readonly object
at org.hibernate.cache.ReadOnlyCache.lock(ReadOnlyCache.java:43)
at org.hibernate.action.CollectionAction.beforeExecutions(CollectionAction.java:70)
at org.hibernate.engine.ActionQueue.prepareActions(ActionQueue.java:246)
at org.hibernate.engine.ActionQueue.prepareActions(ActionQueue.java:152)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:273)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:675)
1: On a save operation this should not matter right? I cannot break anything by writing a new object
2: I actually set the cache mode to ignore, to no avail.
Is this a bug or just not supported?
|