I have a mapping file as below. What my problem is NHibernate do not return
distinct result after querying like following:
_session.CreateQuery("select a from RoleApplication a left join fetch
a.ChildRoleApplications")
.SetResultTransformer(new
DistinctRootEntityResultTransformer())
.List<RoleApplication>()
What may be the problem?
<many-to-one name="Role" column="RoleID"/>
<many-to-one name="Parent" column="ParentID"/>
<many-to-one name="RedirectedRoleApplication"
column="RedirectedRoleApplicationID" />
<set name="ChildRoleApplications" inverse="true"
cascade="all-delete-orphan" lazy="true">
<key column="ParentID" />
<one-to-many class="RoleApplication" />
</set>
<set name="Frames" inverse="true" cascade="all-delete-orphan">
<key column="RoleApplicationID" />
<one-to-many class="Frame" />
</set>...
Thanks in advance.
--
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.