| I would appreciate for a fast reply... this stuff is quite urgent for me and I still cannot find a solution
The fact is that this one-to-many construction was working perfectly with microsoft access. But when we migrated to DB2 v8.1.11.973 this problem occured.
 I am not very experienced in NHibernate and I dot'n even know what is the reason of the failure :(
 
 
 
 Maybe the information I gave was not full
 so here is the database structure of my tables
 -------------------------------------------------------------------------
 --create table "Parent" (
 "Name"               VARCHAR(50)               not null,
 ID                 INTEGER          not null
 generated always as identity
 );
 
 ALTER TABLE "Parent" ADD CONSTRAINT ParentPK PRIMARY KEY ( ID) ;
 
 create table "Child" (
 
 "Name"          VARCHAR(50)               not null,
 ID                 INTEGER          not null
 generated always as identity,
 "Parent_Id"            INTEGER                not null
 );
 
 ALTER TABLE "Child" ADD CONSTRAINT ChildPK PRIMARY KEY ( ID) ;
 
 alter table "Child"
 add constraint "F_26_Ref" foreign key ("Parent_Id")
 references "Node" (ID)
 on delete cascade;
 
 -----------------------------------------------------------------
 
 Here is the full stack trace of my exception
 
 
 at System.Data.Common.FieldNameLookup.GetOrdinal(String fieldName)
 at System.Data.OleDb.OleDbDataReader.GetOrdinal(String name)
 at NHibernate.Driver.NHybridDataReader.GetOrdinal(String name)
 at NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String name)
 at NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String[] names, ISessionImplementor session, Object owner)
 at NHibernate.Collection.AbstractCollectionPersister.ReadKey(IDataReader dr, ISessionImplementor session)
 at NHibernate.Loader.Loader.ReadCollectionElement(Object optionalOwner, Object optionalKey, IDataReader rs, ISessionImplementor session)
 at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, IList hydratedObjects, Object optionalObject, Object optionalId, Key[] keys, Boolean returnProxies)
 at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
 at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
 at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor session, Object[] ids, IType[] types)
 at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor session, Object id, IType type)
 at NHibernate.Loader.OneToManyLoader.Initialize(Object id, ISessionImplementor session)
 at NHibernate.Collection.AbstractCollectionPersister.Initialize(Object key, ISessionImplementor session)
 
 
 |