| I have a class called claimuser that has a collection called 'organizations'. I want to query for all the claimusers who have one of the organizations as the value I am querying for. I am getting this strange error 'Key cannot be null'. Please help
 ------------------------------------------------------------------------
 Key cannot be null.
 Parameter name: key
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
 Exception Details: System.ArgumentNullException: Key cannot be null.
 Parameter name: key
 
 Source Error:
 
 .
 .
 .
 
 Line 983:            if (tstOrg != null)
 Line 984:            {
 Line 985:                criteria.CreateCriteria("organizations")
 Line 986:                        .Add(Expression.Eq("Id", tstOrg.Id));
 Line 987:            }
 
 
 Source File: C:\Projects\CID\IPATH\BusinessLayer\CID.IPath.BusinessLayer\claimuser.cs    Line: 985
 
 Stack Trace:
 
 
 [ArgumentNullException: Key cannot be null.
 Parameter name: key]
 System.Collections.Hashtable.get_Item(Object key) +2842117
 NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass) +24
 NHibernate.Impl.CriteriaImpl.GetClassForPath(String rootAlias, String associationPath) +60
 NHibernate.Impl.CriteriaImpl.CreateAlias(String rootAlias, String associationPath, String alias) +249
 NHibernate.Impl.CriteriaImpl.CreateCriteriaAt(String rootAlias, String associationPath, String alias) +74
 NHibernate.Impl.CriteriaImpl.CreateCriteria(String associationPath) +29
 CID.IPath.NewBusinessLayer.claimuser.Lookup(ClaimUserSearch cs) in C:\Projects\CID\IPATH\BusinessLayer\CID.IPath.BusinessLayer\claimuser.cs:985
 CID.IPath.NewBusinessLayer.claimuser.GetAllExaminers(organization organization, orglocation orglocation, project project) in C:\Projects\CID\IPATH\BusinessLayer\CID.IPath.BusinessLayer\claimuser.cs:1044
 claim_ClaimWizard.PopulateProjectDependentDropdowns() in c:\inetpub\wwwroot\CID_IPATH\claim\ClaimWizard.aspx.vb:1533
 claim_ClaimWizard.rblReviewProject_SelectedIndexChanged(Object sender, EventArgs e) in c:\inetpub\wwwroot\CID_IPATH\claim\ClaimWizard.aspx.vb:2139
 System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +105
 System.Web.UI.WebControls.RadioButtonList.RaisePostDataChangedEvent() +145
 System.Web.UI.WebControls.RadioButtonList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +7
 System.Web.UI.Page.RaiseChangedEvents() +137
 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4778
 
 
 |