Re: Relationship Question
Re: Relationship Question
- Subject: Re: Relationship Question
- From: Tom Jones <email@hidden>
- Date: Mon, 3 Jan 2005 10:34:04 -0600
Greg,
I'm still learning, and have not encountered this error before, but
here's what I get from the documentation
According to the documentation, removeObjectFromBothSidesOfRelationshipWithKey
"Removes the enterprise object eo from the receiver's relationship,
which is identified by key, and also removes the receiver from the
enterprise object eo's inverse relationship if there is one." So, the
ProPrice entity loses it's relationship to the ProPriceSchedule.
I think you want to call removeObjectFromPropertyWithKey, which does
not affect the inverse relationship.
On Mon, 3 Jan 2005 18:30:56 +1000, Greg
<email@hidden> wrote:
> Hi,
> I have an entity called ProPriceSchedule that has a to-many
> relationship to ProPrice. ProPriceSchedule owns the destination of the
> relationship. When I try to delete the a price object by
> removeObjectFromBothSidesOfRelationshipWithKey, an exception is thrown
> and the description is "A <b>Pro Price</b> must have a <b>Price
> Schedule</b>" I know that this is correct as the relationship is
> mandatory in the ProPrice entity.
>
> Why when I save the ec after removing the object that this is happening?
>
> Any help is greatly appreciated,
>
> Regards,
> Greg
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden