[Gotcha!] Cascading deletes
by David Workman
Data Mosaic
[image unavailable: Images]When this one happened to me the other day, I was pulling my hair out and swearing a drunk Gremlin (they are real you know and almost always drunk but only programmers know this) had crawled inside my solution before I could figure out what was going on. I was working on a solution that has quite a complicated data structure -- a couple of the forms show related data four levels deep ( table A --> table B --> table C --> table D). Even in Servoy, this kind of thing can twist your brain into knots to keep organized!
So in my already twisted brain state, I added a delete record script to one of the forms (a list view showing in a tab panel on the form for table A) based on a table somewhere below table A in the relationship chain. A simple thing under any circumstances one would think. But when I tested it...*poof*...the record I was on in table A disappeared! My own supernatural powers having recently been revoked due to unpaid parking tickets, I suspiciously looked around the room for the culprit.
Of course I ended up being the culprit...again. What got me this time?
Comments (3)