-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hi list, I am looking for a solution to define a cascaded update and delete on a field. Unfortunately I can't find a solution. It would be great to get some help on the problem. Thanks in advance, Peter -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkk3mkkACgkQ0qdvZsCNFKGJhQCgo2tweZEv2PFqNsafJVhlLDPh pOIAn2P9cEB206/SDLzGSQBcvGdr4DLn =i0HC -----END PGP SIGNATURE----- _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Note that there is a Glorp mailing list hosted at
sourceforge, which is probably a better option for finding Glorp-specific
answers.
Glorp does not have the ability to take advantage of the database's built-in cascading delete. The primary issue is that the objects in memory won't get told about the deletions that have happened in the database and so things will get out of sync. If you don't care about that (e.g. because you're going to throw away the objects in memory right away after the delete anyway) then you could set up cascaded delete in tables as you would normally. If you're willing to let Glorp do the cascading (less efficient, but better control) then you can do this by sending the message #beExclusive to the mappings that you want to cascade. Taking advantage of update cascade seems to mean that you'd be changing the primary key of the object. I think that would be very likely to cause any number of interesting problems, and I'd think long and hard before trying to do that from within Glorp. At a minimum, it's going to mess up the caching, which is based on primary keys, and you'd want to discard the session immediately. At 03:52 AM 12/4/2008, Peter Osburg wrote: -----BEGIN PGP SIGNED MESSAGE----- --
Alan Knight [|], Engineering Manager, Cincom Smalltalk
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Peter Osburg-2
Hash: SHA1 Hey Alan, thanks a lot. The #beExclusive message did the job. I wasn't aware of the glorp mailing list, but I definately dig into it. Thanks again, Peter Alan Knight schrieb: > Note that there is a Glorp mailing list hosted at sourceforge, > which is probably a better option for finding Glorp-specific > answers. > > Glorp does not have the ability to take advantage of the database's > built-in cascading delete. The primary issue is that the objects in > memory won't get told about the deletions that have happened in the > database and so things will get out of sync. If you don't care > about that (e.g. because you're going to throw away the objects in > memory right away after the delete anyway) then you could set up > cascaded delete in tables as you would normally. > > If you're willing to let Glorp do the cascading (less efficient, > but better control) then you can do this by sending the message > #beExclusive to the mappings that you want to cascade. > > Taking advantage of update cascade seems to mean that you'd be > changing the primary key of the object. I think that would be very > likely to cause any number of interesting problems, and I'd think > long and hard before trying to do that from within Glorp. At a > minimum, it's going to mess up the caching, which is based on > primary keys, and you'd want to discard the session immediately. > > At 03:52 AM 12/4/2008, Peter Osburg wrote: Hi list, > > I am looking for a solution to define a cascaded update and delete > on a field. Unfortunately I can't find a solution. It would be > great to get some help on the problem. > > Thanks in advance, Peter >> _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Alan Knight [|], Engineering Manager, Cincom Smalltalk > [hidden email] [hidden email] http://www.cincom.com/smalltalk > ------------------------- > _______________________________________________ seaside mailing > list [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkk4/uMACgkQ0qdvZsCNFKGKygCgokSI3Wtoottp8oyDYmMziokx hoAAoLArcnP4HpOrNPpfxLJRV/X6iUiQ =dc18 -----END PGP SIGNATURE----- _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |