???

2009/9/26 Roger Kratz <roger.kr...@teleopti.com>:
>
> <<How could I pass
> a reference of it's owner to the component?>>
>
> <parent>
>
> ________________________________________
> Från: nhusers@googlegroups.com [nhus...@googlegroups.com] f&#246;r Jan 
> Limpens [jan.limp...@gmail.com]
> Skickat: den 26 september 2009 00:45
> Till: nhusers@googlegroups.com
> Ämne: [nhusers] Re: component with a non default .ctor
>
> I am not sure how this could be mapped ... does nh behave like a di
> container in this situation? even though, how would nh know which
> instance is the right one? How could I pass
> a reference of it's owner to the component?
>
> 2009/9/25 Fabio Maulo <fabioma...@gmail.com>:
>> when you will upload from NH, NH will inject it through property or field
>> (depending on your mapping)
>>
>> 2009/9/25 Jan Limpens <jan.limp...@gmail.com>
>>>
>>> yes, but how does Discounts get the reference to IHaveDiscounts?
>>>
>>> 2009/9/25 Fabio Maulo <fabioma...@gmail.com>
>>>>
>>>> protected DiscountOrder(){}
>>>>
>>>> 2009/9/25 Jan Limpens <jan.limp...@gmail.com>
>>>>>
>>>>> I have
>>>>>
>>>>> class Order:IHaveDiscounts
>>>>>    public Order(){
>>>>>       discounts = new DiscountContext(this);
>>>>>    }
>>>>>    DiscountContext Discounts
>>>>>    get { return discounts ;}
>>>>>
>>>>> and
>>>>>
>>>>> class DiscountOrder(IHaveDiscounts discounted)
>>>>>     ...
>>>>>
>>>>> Order is a mapped entity and I want to use DiscountOrder as a
>>>>> component to strip Order from behaviour it should not really own, it's
>>>>> becoming WAY to big, anyway. But when I try this NH complains about
>>>>> it:
>>>>> No default constructor for entity: DiscountContext
>>>>>
>>>>> Is there an easy way around this? Currently I seem to hit my head on
>>>>> NH all the time when I try to keep my domain as I think it should be
>>>>> :(
>>>>>
>>>>> --
>>>>> Jan
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Fabio Maulo
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Jan
>>>
>>>
>>
>>
>>
>> --
>> Fabio Maulo
>>
>> >
>>
>
>
>
> --
> Jan
>
>
> >
>



-- 
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to