hello
I'm new in world of NHibernate.

I have some mapping:

<class entity-name="Person" table="table1">
<id column="Id" type="long" name="Id"/>
<set name="Address">
<key column="Person_id"/>
<one-to-many class="Address"/>
</set>
<property column="Id" name="Id" type="long"/>
<property column="Last_Name" name="LastName" type="string"/>
<property column="First_Name" name="FirstName" type="string"/>
<property column="Education" name="Education" type="string"/>
</class>

<class entity-name="Address" table="table2">
<id column="Id" type="long" name="Id"/>
<property column="Id" name="Id" type="long"/>
<property column="City" name="City" type="long"/>
<property column="Street" name="Street" type="string"/>
<property column="number" name="number" type="string"/>
</class>

It's my HQL query hbm= "from person p join fetch p.Address WHERE p.id
in (:ids)"

but now I get select * from both tables(Address and Person) I need HQL
that return LastName,FirstName of person and collection of Addresses
that contains City , Street in the Person.


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to