I use automapping in my project so how should I write the mappings for
this to work?

On Oct 31, 9:09 pm, James Gregory <jagregory....@gmail.com> wrote:
> That's not possible out of the box. NHibernate requires a default constructor 
> for proxying.
>
> An alternative is that components can have a special "parent" property that 
> will be populated with a reference to the containing entity. Use the Parent 
> method in your component mapping.
>
> On 31 Oct 2010, at 20:02, marcus <mar...@meridium.se> wrote:
>
> > Maybe i'm not thiniking clear but this is what I would like to do
>
> > public class Person {
> > public virtual string Name {get;set;}
> > public virtual string Address {get;set;}
> > }
> > public class Address {
>
> > public virtual string Street {get;set;}
> > public Address(Person person) { } // the person this address is a
> > component of
> > }
>
> > On Oct 31, 8:39 pm, James Gregory <jagregory....@gmail.com> wrote:
> >> Current instance of what?
>
> >> On 31 Oct 2010, at 18:15, marcus <mar...@meridium.se> wrote:
>
> >>> Is it possible to inject the current instance into a mapped component?
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "Fluent NHibernate" group.
> >>> To post to this group, send email to fluent-nhibern...@googlegroups.com.
> >>> To unsubscribe from this group, send email to 
> >>> fluent-nhibernate+unsubscr...@googlegroups.com.
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/fluent-nhibernate?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Fluent NHibernate" group.
> > To post to this group, send email to fluent-nhibern...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > fluent-nhibernate+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/fluent-nhibernate?hl=en.

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

Reply via email to