Hi, I'm trying to make a set with special needs and I have read a lot of 
page without luck.

Lets suppose that I have a mapping of a Sql View

<class name="Namespace.ViewName, Assembly" table="ViewName">

<id name="MyColumnIdOfThisView" column="[MyColumnIdOfThisView]" 
type="System.Guid">
<generator class="assigned"/>
</id>
<property name="AForeignKey" column="[AForeignKey]" 
access="field.pascalcase-underscore" not-null="true" type="System.Guid"/>

</class>

And lets suppose that I have other mapping like this:


<class name="Namespace.MyClassName, MyAssembly" table="MyClassName" >

<id name="Id" column="MyClassIdColumnName" type="System.Guid"><generator 
class="guid"/></id>
<property name="AForeignKey" column="AForeignKey" 
access="field.pascalcase-underscore" not-null="false" type="System.Guid" 
insert="true" update="true"/>

</class>


Where AForeignKey from view and AForeignKey from class store the same 
values, so we can make a inner join but are named different. For example: 
CaseID, AssociatedID


What I want to do is a mapping of set using this foreign keys. Something 
like this (in the view)

<set name="MyClassNameList" cascade="none" inverse="true" lazy="true" 
access="field.pascalcase-underscore">
<Source key>
<column name="CaseID" />
</Source key>
<Target key>
<column name="AssociatedID"/>
</Target key>
<one-to-many class="MyNamespace.MyClassName, GIOFACT_DAL"/>
</set>

Is this possible? 
A lot of thanks in advance!

Best,

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/XwNxEIW7EugJ.
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