Another user had exact same problem. Check the thread. Maybe error
needs to be more explanatory, or some check in mapping needs to be
performed?

http://groups.google.com/group/nhusers/browse_thread/thread/34f124a7052c37ff/c2dd39e7db9761df?hl=en&lnk=gst&q=IndexOutOfRangeException#c2dd39e7db9761df


On Oct 30, 9:13 am, epitka <[email protected]> wrote:
> Has anybody encountered this error before. I have two subtypes and for
> one persisting works for the other one it does not.
> I am using table-per-class-hierarchy
>
> System.IndexOutOfRangeException: Invalid index 9 for this
> SqlParameterCollection with Count=9.
>
> at System.Data.SqlClient.SqlParameterCollection.RangeCheck(Int32
> index)
> at System.Data.SqlClient.SqlParameterCollection.GetParameter(Int32
> index)
> at
> System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item
> (Int32 index)
> at NHibernate.Type.Int32Type.Set(IDbCommand rs, Object value, Int32
> index)
> at NHibernate.Type.NullableType.NullSafeSet(IDbCommand cmd, Object
> value, Int32 index)
> at NHibernate.Type.NullableType.NullSafeSet(IDbCommand st, Object
> value, Int32 index, ISessionImplementor session)
> at NHibernate.Persister.Entity.AbstractEntityPersister.Dehydrate
> (Object id, Object[] fields, Object rowId, Boolean[] includeProperty,
> Boolean[][] includeColumns, Int32 table, IDbCommand statement,
> ISessionImplementor session, Int32 index)
> at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object
> id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql,
> Object obj, ISessionImplementor session)
> at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object
> id, Object[] fields, Object obj, ISessionImplementor session)
> at NHibernate.Action.EntityInsertAction.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()
> at NHibernate.Transaction.AdoTransaction.Commit()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to