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: aa...@chatnbike.com <mailto:aa...@chatnbike.com> t: (301) 956-2319 > On Jul 28, 2019, at 7:01 AM, Robert Hanviriyapunt via Webobjects-dev > <webobjects-dev@lists.apple.com> 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 (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com > > This email sent to aa...@chatnbike.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com