• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: deleting and many to many
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deleting and many to many


  • Subject: Re: deleting and many to many
  • From: John Larson <email@hidden>
  • Date: Mon, 13 Aug 2007 07:47:59 -0500

Hi Frank,

A couple of comments. Generally, the primary key for the many to many relationship is the combination of the two primary keys that the table is linking together. It may be possible for it to work without it set up like that, but I've never done it. Secondly, there are usually six key relationships in many-to-many relationships. In your case, RB and RA should have "nullify" as their delete rule. The cardinality should be "to one" and the optionality should be "mandatory." The next two relationships are the inverse ones: BR and AR. They should be to-many and optional. They should have "cascade" as their delete rule. None of those four relationships need to be class properties. The last two relationships are the actually to- many relationships that are defined as BR.RA or AR.RB. Those are the only relationships that you should have to work with (unless the link table has specific info you want to get).

Is that what your setup looks like? If so, and it still doesn't work, then you may have to dig deeper. I've been stumped by nearly every type of frustrating relationship imaginable and it almost always comes down to me swearing that my model is right, but finding out that I am wrong. Even if it is "right" by normal human logic, EO have very little tolerance for other opinions of what is right and wrong and won't work if it isn't the way it wants it.

John

On Aug 9, 2007, at 6:52 AM, Frank Stock wrote:

Hello,


I have a table A and B and a many to many relation R between A en B.
The relation-table R has a primairy key and the relation RA to A and RB to B. (RA and RB can't be null)
I see that there are a few rows in R where RB is 0 or RA is 0 or (RA and RB are 0), a few have a RB with no link to B, so if we delete A, we get an error.
The EOmodel is OK so, if we delete B, the cascade is working to delete related R's.
How can RA or RB get 0? Where do I have to look??


We have about 1% errors.

Thanks for advice.
Frank Stock


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


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
  • Follow-Ups:
    • Re: deleting and many to many
      • From: Frank Stock <email@hidden>
References: 
 >deleting and many to many (From: Frank Stock <email@hidden>)

  • Prev by Date: Re: multi select in EOModeler
  • Next by Date: Reliability EOModeler
  • Previous by thread: deleting and many to many
  • Next by thread: Re: deleting and many to many
  • Index(es):
    • Date
    • Thread