Re: mandatory relatoinship preventing deletion?
Re: mandatory relatoinship preventing deletion?
- Subject: Re: mandatory relatoinship preventing deletion?
- From: email@hidden
- Date: Tue, 21 Oct 2003 14:21:57 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
Hmm, this could be the cause of any mysterious error I'm getting. It's a
hard one to explain, but basically involves an EO, in propagateDelete...
method, tries to remove some destination of one of it's relationships (to
honor the delete propagation), and gets a weird "wrong editing context"
exception. Can't figure out how an EO's own relatoinship destinations
can be in a wrong EC (I do check in all relationship manipulation methods
to make sure you can't give an EO an improperly-ECd destination to a
relationship, so that's not the problem).
If these two exceptions are related, it would be interesting, as they are
both my biggest annoyances right now. Hard to reproduce, can't figure out
what the heck is going on.
But I still can't figure out what's going on. I'm not getting any other
mysterious logged exceptions immediately prior to the one's we're talking
about. If the one's we're talking about are just a sort of side effect of
some EOF stack corruption, I can't figure out what's causing the EOF
stack corruption.
As far as I know, I lock all ECs. I've never succeeded in turning on
warnings for unlocked ECs, so I could be wrong. But I'm pretty sure I'm
succesfully locking all ECs.
Hmm. Any other ideas or hints or possible solutions would be welcome.
When you did see things like this before, how did you solve them?
--Jonathan
On Tue, 21 Oct 2003 11:16:22 -0700 Chuck Hill wrote:
> I've seen things like this before from failed saves and from not
> locking editing contexts. Particularly failures from deletes that
> failed validation, but errors at the adaptor level *may* also cause
> this. I think the root cause was the ec rolling back the undo stack
> too far.
>
> What seems to be happening is the nullify delete rule is nulling the
> department and then the object is being re-validated for save.
>
> Or, perhaps, you have a nullify delete rule when you should have no
> action.
>
> That is all I can think of now.
>
>
> Chuck
>
>
> email@hidden wrote:
>
> > [demime could not interpret encoding binary - treating as plain text]
> > Having a relationship set to 'mandatory' shouldn't prevent
> deletion, should it?
> >
> > I have two entities, which I'll call Employee and Department. Employee
> > has a mandatory to-one to Department. When I try to delete an
> > Employee.... I get a validation exception saying "the department
> property
> > of Employee must have a Departmetn assigned." Huh? But I'm trying to
> > delete it. And it did have a Department assigned before I deleted it. I
> > don't get it.
> >
> > --Jonathan
> > _______________________________________________
> > webobjects-dev mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> > Do not post admin requests to the list. They will be ignored.
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
>
> Progress is the mother of all problems.
> - G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.