DRY is for classes in DB you have normalization/denormalization
btw
http://nhforge.org/doc/nh/en/index.html#collections-heterogeneous

2010/3/17 Dan Kennedy <[email protected]>

> I understand that there will be a nullable column for each parent but
> that's the existing schema.  I guess the reason for implementing it
> that way was so DRI could still be enforced while re-using a common
> set of fields in the table.  I know that it would be much simpler to
> map if there was a PersonPhoneNumber table and an
> OrganisationPhoneNumber table but the question was really whether
> nhibernate could be used with the existing schema?
>
> On Mar 17, 2:40 pm, Fabio Maulo <[email protected]> wrote:
> > Map it naturally and you will have two nullable columns in
> OwnedPhoneNumber
> > (one per each parent).
> > Why ?
> > Think about how RDBMS's FK works
> >
> > 2010/3/17 Dan Kennedy <[email protected]>
> >
> >
> >
> > > I've posted this question on stackoverflow but have not exactly had a
> > > stunning response so far.  I basically want to map a different foreign
> > > key column on a child collection depending on the type of the parent
> > > object. The question has sample tables and code to explain the problem
> > > more clearly.  Does anyone know if this is possible?
> >
> > >http://stackoverflow.com/questions/2454995/map-different-child-foreig.
> ..
> >
> > > Thanks
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "nhusers" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<nhusers%[email protected]>
> <nhusers%[email protected]<nhusers%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
> >
> > --
> > Fabio Maulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to