These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Invalid index 22 for this SqlParameterCollection with Count=
PostPosted: Tue Apr 14, 2009 5:37 am 
Newbie

Joined: Fri Apr 03, 2009 9:40 am
Posts: 10
I have a table called Person and a table called Application. The Application table is set up as follows:

CREATE TABLE [dbo].[Application]
(
[ApplicationID] [int] NOT NULL Identity,
[ApplicationTypeID] [int] NOT NULL References ApplicationType(ApplicationTypeID),
[PersonID] [int] NOT NULL References Person(PersonID),

Etc etc

In my Application HBM I have

<many-to-one name="Applicant" column="PersonID" class="Person" lazy="false"/>


Everything works fine in that the session can loads data from the database, but when I try to save I get the exception –

Invalid index 22 for this SqlParameterCollection with Count=22.

I’m very new to NHibernate and a simple explanation would be much appreciated.

Cheers.

FlyTVR


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 14, 2009 6:44 am 
Newbie

Joined: Fri Apr 03, 2009 9:40 am
Posts: 10
Solved. I had entred duplicate binding information.

<component name="MembershipGrade">
<property name="Value" column="MembershipGradeValue" type="String"/>
</component>

<component name="MembershipStatus">
<property name="Value" column="MembershipGradeValue" type="String"/>
</component>

Hope this saves you a day of work!!!! :-(


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.