Hi!
 
I wanted to create an issue directly on nHibernate JIRA, but haven't got 
the rights...
 
I'd just like to report the following:
 
When trying to save a new instance of an entity marked with Cache.ReadOnly() 
and you break the Primary key's unique constraint by inserting a value 
already used (ok, I know it should have been an Identity field, but you 
don't always control what other People do when creating a table...), you 
get the following misleading message:
 
System.InvalidOperationException : ReadOnlyCache: Can't write to a readonly 
object Ecomal.Data.Entities.AccountManagerStatus
    at NHibernate.Cache.ReadOnlyCache.Lock(CacheKey key, Object version)
    at NHibernate.Action.EntityUpdateAction.Execute()
    at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
    at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
    at NHibernate.Engine.ActionQueue.ExecuteActions()
    at 
NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource
 
session)
    at 
NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
    at NHibernate.Impl.SessionImpl.Flush()
 
 
Cheers,
Stephan

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to