What do you mean isn't supported? It is supported, it just doesn't do relationships. Create a patch, or at the very least an issue, then it'll get fixed.
On Fri, Jul 24, 2009 at 6:55 AM, Dmitiry Nagirnyak <[email protected]> wrote: > HI James, > > Thanks for the help. > > Why IsComponentType is published if it is not supported at all? > > Anyway, I suppose I stil can override the automapping for each class that > needs the component in it. > > Cheers, > Dmitriy. > > 2009/7/24 James Gregory <[email protected]> > > Automapped components don't support relationships. You'll have to map it >> manually, for each entity that contains the component. Nice, I know. >> >> On Fri, Jul 24, 2009 at 4:22 AM, dnagir <[email protected]> wrote: >> >>> >>> Hi, >>> >>> After setting the IsComponentType: >>> private void SetupMapping(AutoMappingExpressions s) { >>> Type[] componentTypes = new Type[] { >>> typeof(Address) >>> }; >>> >>> s.IsComponentType = t => componentTypes.Any(x => t == x); >>> } >>> >>> >>> I am getting the error below (from the NH itself): >>> Could not determine type for: Country, for columns: >>> NHibernate.Mapping.Column(AddressCountry). >>> >>> Assuming just Person-Address-Country relations. >>> >>> Here's related component HBM: >>> <component name="Address" insert="true" update="true"> >>> <property name="Id" type="Int32"> >>> <column name="AddressId" not-null="true" /> >>> </property> >>> <property name="Line1" type="String"> >>> <column name="AddressLine1" length="50" /> >>> </property> >>> <property name="Line2" type="String"> >>> <column name="AddressLine2" length="50" /> >>> </property> >>> <property name="Suburb" type="String"> >>> <column name="AddressSuburb" length="50" /> >>> </property> >>> <property name="State" type="String"> >>> <column name="AddressState" length="50" /> >>> </property> >>> <property name="PostCode" type="String"> >>> <column name="AddressPostCode" length="50" /> >>> </property> >>> <property name="Country" type="Test.Country, Test, >>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> >>> <column name="AddressCountry" /> >>> </property> >>> </component> >>> >>> What am I missing here? >>> Note the AddressId should be ignored in mapping, but that's another >>> question. >>> >>> Cheers, >>> Dmitriy. >>> >>> >> >> >> >> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
