I am glad you replied because I thought I was going insane! :)Yes I agree
the name is confusing and does not really map to what NHibernate does.


2009/6/15 Hudson Akridge <[email protected]>

> Scratch that, wasn't paying attention there ;) . You're right, .Component()
> on a collection does actually write out a CompositeElementPart, I just
> caught the name and thought that it might have been a classlike bleed
> through and you'd actually get a ComponentPart written out instead.  Carry
> on!
> (We should probably change the name of that)
>
>
> On Mon, Jun 15, 2009 at 7:33 AM, Hudson Akridge 
> <[email protected]>wrote:
>
>> 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
>>
>
>
>
> --
> - 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to