Hi Chris That is currently the only way to map components using Auto Mapping, we really need to look into a better way of doing this but I'm currently working on inheritance support which is complex, once that's done component mapping is on my to-do list. However we're always grateful to receive patchs. ;o)
I'm currently thinking along the lines of : AutoPersistenceModel.MapEntitiesFromAssemblyOf<Company>() .Where(t => (t.Namespace == typeof(Company).Namespace) .WithComponent<Address>( m => // Some mapping logic here); What do you think is this the kind of interface you'd like to see? Cheers Andy On Mon, Dec 8, 2008 at 6:52 PM, Chris Marisic <[EMAIL PROTECTED]>wrote: > > What is the proper way to do Component mapping with Auto Mapping? > > IE this regularly into auto-mapping > > Component(employee => employee.Address, > address => > { > address.Map(a => a.City).WithLengthOf(15); > address.Map(a => a.CountryRegionName).WithLengthOf(15); > address.Map(a => a.PostalCode).WithLengthOf(10); > address.Map(a => a.StateProvinceName).WithLengthOf(15); > address.Map(a => a.AddressLine1,"Address").WithLengthOf(60); > } > > ); > > > -- ================= I-nnovate Software - Bespoke Software Development, uk wirral. http://www.i-nnovate.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---