On 3/28/08 8:30 AM, "Andrus Adamchik" <[EMAIL PROTECTED]> wrote:
 
> That's the main area of disagreement. Essentially you are saying that
> runtime relationships are harmful and not needed in Cayenne at all. My
> point is that they were introduced exactly to allow users to remove
> explicit relationships whenever they please (the original motivation
> for runtime relationships was to enable one-way to-many). In other
> words runtime relationships are there for a reason and should be
> considered an internal artifact of Cayenne and users shouldn't be
> bothered about their presence (as long as everything works as
> advertised).

Okay.  I've always viewed them as just a way to not have to specify the
other half of a mapped relationship.  The fact that new ones were being
created for relationships I never intended on using was news to me.  Having
said that, if I never ran into a problem, it was likely something I was
never going to discover anyway.
 
> So we should separate cases where runtime relationships are the cause
> of the problem vs. cases where the problem is elsewhere.

Agreed.

> So regarding runtime relationships... Maybe we should write targeted
> unit tests to demonstrate delete rules and/or validation problems they
> may cause?

I've not come across a case where delete rules weren't followed for both
based and subclasses.  That was actually what I thought was going wrong
initially.  Then I discovered it was just two different relationships where
one was ignored and the delete rules were followed on the other.

I suppose tests that verify that behavior wouldn't be a terrible idea
though.

-- 
Kevin

Reply via email to