Not possible using <any> or <many-to-any> because NH need to load the 2 field before know which is the table to hit.
2009/3/31 Bartosz Pierzchlewicz <[email protected]> > > Hi, > my mapping: > > <bag name="RelatedElements" access="property" > table="RelatedElementsToCategory" lazy="true"> > <key column="elemId" /> > <many-to-any id-type="Int32" meta-type="System.String"> > <meta-value value="Product" class="DataLibrary.DbProduct, > DataLibrary" /> > <meta-value value="Category" > class="DataLibrary.SimpleDictionaries.DbRelatedCategory, DataLibrary" / > > > <column name="elemType" /> > <column name="RelElemId" /> > </many-to-any> > </bag> > > I spend several hours trying to eager fetch RelatedElements > collection. > I tried both HQL and Criteria API. Still without result. > I also tried to do this using multiquery, but RelatedElements didn't > contains 'id' and 'class' fields (mentionen in > > http://groups.google.com/group/nhusers/browse_thread/thread/f5ebef1e6aa51c33/dff52c507a819287 > ). > > Did anyone tried to do this? > > I'am using NHibernate 2.1.0.1001 (January 2009) > > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
