Sergej
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
I think calling it a parent-child relationship is not really helpful, it's more of a A-depends-on-B relationship, i.o.w.: it's a dependency, not a parent -> child relationship, as for example 'Order' in northwind has 2 m:1 relationships: with Customer and with Employee. Which one is the 'parent' ? Also in diamond shaped models, multiple dependency paths are visible, but on the node level it's not known which path is the real dependency.
FB
>
> Diego
>
>
>
> On Mon, Aug 2, 2010 at 09:06, Diego Mijelshon <di...@mijelshon.com.ar>
> wrote:
>
>
> I didn't understand your statement, but many-to-one is a parent-to-
> child relationship (i.e. the declaring entity depends on the referenced
> one).
>
> Let's say I have three classes, Parent, ChildA and ChildB.
> ChildA and ChildB have many-to-one references to Parent.
> When setting a ChildA.Parent to null, how in the world do you expect
> to check if the Parent is "orphan"? By doing two selects (in ChildA and
> ChildB tables) and seeing if there are any records???
>
> Diego
>
>
>
> On Mon, Aug 2, 2010 at 04:38, Jacob Madsen <ja...@mungo.dk> wrote:
>
>
> Are you sure it doesn't make sense? Do you believe that its
> not be possible in real world domains that (many-to-one) child entities is
> replaced in the lifetime of the aggregate.
>
>
>
> 2010/8/2 Diego Mijelshon <di...@mijelshon.com.ar>
>
>
> Many-to-one doesn't have the concept of orphans (it
> doesn't make sense).
> Valid cascade values are here:
> http://nhforge.org/doc/nh/en/index.html#mapping-declaration-manytoone
> <http://nhforge.org/doc/nh/en/index.html#mapping-
> declaration-manytoone>
>
> Diego
>
>
>
> On Sun, Aug 1, 2010 at 17:16, Jacob Madsen
> <ja...@mungo.dk> wrote:
>
>
> Yes, "all-delete-orphan" is not an option.
>
> Do someone know if delete orphan is even
> supported for many-to-one?
>
> I am using version 2.1.2.4000.
>
>
>
> On Jul 30, 10:41 pm, Sergej Koščejev
> <sergey....@gmail.com> wrote:
> > On 30.7.2010 22:09, Aaron Fischer wrote:>
> cascade="all-delete-orphan"
> >
> > As far as I remember, orphan delete is only
> supported for collections.
> >
> > Sergej
>
> --
> You received this message because you are
> subscribed to the Google Groups "nhusers" group.
> To post to this group, send email to
> nhu...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+u...@googlegroups.com
> <mailto:nhusers%2Bunsu...@googlegroups.com> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to
> the Google Groups "nhusers" group.
> To post to this group, send email to
> nhu...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+u...@googlegroups.com
> <mailto:nhusers%2Bunsu...@googlegroups.com> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the
> Google Groups "nhusers" group.
> To post to this group, send email to nhu...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+u...@googlegroups.com
> <mailto:nhusers%2Bunsu...@googlegroups.com> .
:P
In ORM land, parent-child is already defined: for inheritance, so IMHO it's best not to overload it with an ambiguistic definition again. But it's hard though, many people still think that an FK constraint defines a parent-child relationship ;)
> Point taken.
> he logic around it is still the same, regardless of how we call it. If A
> references/depends-on/is-a-child-of B, then it makes no sense to orphan B
> based on its relationship with A.
indeed, as B is never an 'orphan' in the sense that it has a violating constraint. So I think the topic starter wants something else than what he discussed.
FB
> > <mailto:nhusers%2Bunsu...@googlegroups.com
> <mailto:nhusers%252Buns...@googlegroups.com> > .
>
> > For more options, visit this group at
> > http://groups.google.com/group/nhusers?hl=en.
> >
> >
> >
> >
> >
> >
> > --
> >
> > You received this message because you are
> subscribed to
> > the Google Groups "nhusers" group.
> > To post to this group, send email to
> > nhu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nhusers+u...@googlegroups.com
> <mailto:nhusers%2Bunsu...@googlegroups.com>
>
> > <mailto:nhusers%2Bunsu...@googlegroups.com
> <mailto:nhusers%252Buns...@googlegroups.com> > .
>
> > For more options, visit this group at
> > http://groups.google.com/group/nhusers?hl=en.
> >
> >
> >
> >
> >
> > --
> >
> > You received this message because you are subscribed
> to the
> > Google Groups "nhusers" group.
> > To post to this group, send email to
> nhu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nhusers+u...@googlegroups.com
> <mailto:nhusers%2Bunsu...@googlegroups.com>
>
> > <mailto:nhusers%2Bunsu...@googlegroups.com
> <mailto:nhusers%252Buns...@googlegroups.com> > .