Hi,
I have the following mapping:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="GestionCaissesInfo" namespace="GestionCaissesInfo"> <class name="CaisseBase" table="`CaisseBase`" lazy="true"> <id name="IdCaisseBase" column="`idCaisseBase`" type="int"> <generator class="native" /> </id> <property type="string" not-null="true" length="100" name="Nom" column="`nom`" /> <property type="string" not-null="true" length="3" name="Institution" column="`institution`" /> <property type="string" not-null="true" length="7" name="Transit" column="`transit`" /> <joined-subclass name="CaisseDeveloppement" extends="CaisseBase" table="CaisseDeveloppement" > <key column="fk_idCaisseBase"/>
<property type="int" name="NombreFolio" column="`nombreFolio`" /> <property type="Boolean" name="Supportldap" column="`supportLDAP`" /> <property type="Boolean" name="EstObligatoire" column="`estObligatoire`" />omaineDomino`" /> </joined-subclass>
</class> </hibernate-mapping>
I try to apply this criteria:
ICriteria critereCaisseBase = Session.CreateCriteria(typeof(CaisseBase));
ICriteria critereCaisseDeveloppement = critereCaisseBase.CreateCriteria("CaisseDeveloppement", NHibernate.SqlCommand.JoinType.LeftOuterJoin); critereCaisseDeveloppement.Restrictions.Add(Restrictions.IsNull("IdCaisseBase"));
critereCaisseBase.List();
I've got the following error:
"could not resolve property: CaisseDeveloppement of: GestionCaissesInfo.CaisseBase"
How could I do a left join on CaisseDeveloppement? I don't want to use a subquery because, in some situation, I need to do something like: critereCaisseDeveloppement.AddOrder(...
I use nHibernate 2.0.1.4000 because the plateforme is .NET 2.0.
Thank you,
|