• 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: One to many not nullifying when reverse is not marked for in-class generation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One to many not nullifying when reverse is not marked for in-class generation


  • Subject: Re: One to many not nullifying when reverse is not marked for in-class generation
  • From: Aaron Rosenzweig via Webobjects-dev <email@hidden>
  • Date: Sun, 28 Jul 2019 07:24:31 -0400

Hi Robert,

I’m missing a piece of info from that story - so let us back up a bit.

A “to-Many” relationship isn’t really, it’s a figment of our imagination. It’s
an optional byproduct of SQL relational math.

The “toOne” relationship is the only thing real here. It is generally an
integer foreign-key (FK) that points to the primary-key (PK) of another table.
I say “generally” because it does not have to be a PK that it points too… and
sometimes the FK is a VARCHAR instead of an integer, but I digress.

So, if you model the “to-Many” it’s always a convenience thing. You are correct
that if the toMany is large, you probably don’t want to model it. You can
always do a fetch when you really need that info.

What confuses me in the story-line is that you say you removed the “toMany”
from your model and when you delete object with the FK it does not fix the
“toMany”… There is no toMany… so what is there to fix?
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  email@hidden <mailto:email@hidden>  t:  (301) 956-2319



> On Jul 28, 2019, at 7:01 AM, Robert Hanviriyapunt via Webobjects-dev
> <email@hidden> wrote:
>
> Hi I did an experiment with my model where I had a one-to-many relationship
> with a reverse.  I had the nullify rule on the reverse to-many.  When I
> delete the one, the many were nullified.  But then I thought to remove
> to-manys from class generation to save from fetching the array of faults — I
> suppose it worked, still not sure it was the right thing to do, esp as a
> modeling practice under conditions where the to-many might be fairly large.
> Anyway, now when I delete the one, the to-manys are NOT nullified!  Any way
> to fix this other than including the to-manys, or programmatically on
> validate for delete or something?
>
> _______________________________________________
> 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

References: 
 >One to many not nullifying when reverse is not marked for in-class generation (From: Robert Hanviriyapunt via Webobjects-dev <email@hidden>)

  • Prev by Date: One to many not nullifying when reverse is not marked for in-class generation
  • Next by Date: Re: One to many not nullifying when reverse is not marked for in-class generation
  • Previous by thread: One to many not nullifying when reverse is not marked for in-class generation
  • Next by thread: Re: One to many not nullifying when reverse is not marked for in-class generation
  • Index(es):
    • Date
    • Thread