Home and Office has a common root entity, may be Address. 2009/6/25 Fethi Gürcan <[email protected]>
> Hello, I have a sample map for testing <any> below. > > *Sample Scenario:* There are Office and Home Entities. And Phone Entity > that parent as Office or Home with <any> mapping. > > It is good but i don't know how i can add a IList<Phone> property to Home > and Office classes that gets the own phone records?? > > Thanks. > > <?xml version="1.0" encoding="utf-8"?> > <!--Generated from NHibernate.Mapping.Attributes on 2009-06-25 > 12:51:23Z.--> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> > > <class name="Test.Office, Test" table="`Office`"> > <id name="Id" column="`OfficeId`"> > <generator class="guid" /> > </id> > <property name="Name" column="`Name`" length="100" not-null="true" /> > </class> > > <class name="Test.Home, Test" table="`Home`"> > <id name="Id" column="`HomeId`"> > <generator class="guid" /> > </id> > <property name="Name" column="`Name`" length="100" not-null="true" /> > </class> > > <class name="Test.Phone, Test" table="`Phone`"> > <id name="Id" column="`PhoneId`"> > <generator class="guid" /> > </id> > <property name="Name" column="`Name`" length="100" not-null="true" /> > <any id-type="Guid" meta-type="String" name="Parent"> > <meta-value value="Office" class="Test.Office, Test" /> > <meta-value value="Home" class="Test.Home, Test" /> > <column name="`ParentType`" /> > <column name="`ParentId`" /> > </any> > </class> > > </hibernate-mapping> > > -- > Fethi Gürcan > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
