Ah, you're looking for component mappings :) .AsElement() gets you a composite element in a collection, .Component gets you the component mappings
On Mon, Jun 15, 2009 at 3:23 AM, Derek Ekins <[email protected]> wrote: > This wasn't quite right but maybe I didn't make the question clear. However > I have found the solution. > HasMany(x => x.Media) > .WithTableName("AlbumMedia") > .Component(c=> > { > c.WithParentReference(x => x.Album); > c.References(x => x.Media, "MediaId"); > }); > > Will map a collection made up of a composite elements. > Cheers. > > 2009/6/15 Hudson Akridge <[email protected]> > >> HasMany().AsElement() >> >> On Sun, Jun 14, 2009 at 1:52 PM, Derek Ekins <[email protected]> wrote: >> >>> >>> Hi, >>> Is it possible to map a composite element inside of a list? >>> If so is there an example of this somewhere? >>> >>> If not then is it possible to hand write that part of the xml file and >>> write it out in the mapper class? >>> >>> Thanks >>> >>> >>> >> >> >> -- >> - Hudson >> http://www.bestguesstheory.com >> http://twitter.com/HudsonAkridge >> >> >> >> > > > > -- - Hudson http://www.bestguesstheory.com http://twitter.com/HudsonAkridge --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
