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
|