Joined: Fri Dec 09, 2005 2:22 pm Posts: 16
|
Hi,
I have two simple classes:
<class name="Country" table="codCountry" mutable="false">
<id name="Id" >
<generator class="increment" />
</id>
<version name="Version"/>
<property name="Description" />
<property name="Code" />
<many-to-one name="Currency" column="CurrencyID" not-null="true" />
</class>
and
<class name="Currency" table="codCurrency" mutable="false">
<id name="Id" >
<generator class="increment" />
</id>
<version name="Version"/>
<property name="Description" />
<property name="Code" />
</class>
when I call session.Find("From Country");
I have one SQL call for all countries and one SQL call for each currency.
What is wrong ? Why cant it be done in only one SQL call ?
thank you
|
|