Yes, I had this working using <any> and one-to-many with a where
clause. Ayende has an example of this in the SampleApplications of his
RhinoTools. The model is similar to yours - Both Post and Blog have a
one-to-many relationship with Tags. I am pasting the relevant mapping
below:
Tag class:
<any name="Entity"
id-type="Int32"
meta-type="Int32">
<meta-value class="Post" value="1"/>
<meta-value class="Blog" value ="2"/>
<column name="ItemId"/>
<column name="ItemType"/>
</any>
Post Class:
<set name="Tags"
where="ISNULL(ItemType,1) = 1"
table="Tags">
<key column="ItemId"/>
<one-to-many class="Tag"/>
</set>
Blog Class:
<set name="Tags"
where="ISNULL(ItemType,2) = 2"
table="Tags">
<key column="ItemId"/>
<one-to-many class="Tag"/>
</set>
Hope this helps
Job Samuel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---