Skip to content

Instantly share code, notes, and snippets.

@srkirkland
Created August 2, 2011 18:05
Show Gist options
  • Save srkirkland/1120805 to your computer and use it in GitHub Desktop.
Save srkirkland/1120805 to your computer and use it in GitHub Desktop.
Error with proxy during batching
[InvalidCastException: Unable to cast transparent proxy to type 'System.Data.SqlClient.SqlCommand'.]
NHibernate.AdoNet.SqlClientBatchingBatcher.AddToBatch(IExpectation expectation) +255
NHibernate.Persister.Collection.AbstractCollectionPersister.PerformInsert(Object ownerId, IPersistentCollection collection, IExpectation expectation, Object entry, Int32 index, Boolean useBatch, Boolean callable, ISessionImplementor session) +355
NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session) +305
NHibernate.Action.CollectionRecreateAction.Execute() +151
NHibernate.Engine.ActionQueue.Execute(IExecutable executable) +42
NHibernate.Engine.ActionQueue.ExecuteActions(IList list) +59
NHibernate.Engine.ActionQueue.ExecuteActions() +60
NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) +121
NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) +92
NHibernate.Impl.SessionImpl.Flush() +291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment