Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Cascading referential integrity constraints for one-to-many relations
Ability to define the actions that the TeamDesk takes when a user tries to delete or update a key to which existing foreign keys point.

* **NONE** - do nothing (currently works this way)
* **ERROR** - an error is raised and the delete/update is rolled back
* **CASCADE** - all rows that contain those foreign keys are also deleted/updated
* **SET NULL** - all the values that make up the foreign key in the rows that are referenced are set to null
* **SET DEFAULT** - all the values that make up the foreign key in the rows that are referenced are set to their default value
ID
52
Category
Setup
Author

Slava Shinderov  Staff 
Date Created
12/15/2006 7:49:20 AM
Date Updated
9/14/2015 3:15:11 PM
Status
New Idea
Score
340
Promoted By
Dale OliverRafael Muñizrishi uttam
Philipp MatuschkaFrancisco Wylerbasenine
Luison LassalaIrfanDesmond Beatty (Conc)
Rick Cogleymartin oliverSimon Petralli
Arnold HakobyanJohn ArmstrongShem Sargent
Paul O'BrienDesmond BeattyGrant Simmons
beoNathan Phillips (CW)Rick Cogley
Alfredo BravoGraham WhiteRonald Sarazin
maria cinara maria cinarawalhhornFabio Cardillo
Ben FatchenKevin SmithMatthew Porter
Kevin CookAnthony CarterRainer Hochkoeppler
Slava Shinderov  Staff 
Comments
Kevin Cook 10/22/2007 8:50:49 AM
To ALL: TeamDesk admins, I would have thought that others would have promoted this to make it a top priority!!!

Kirill Bondar  Staff  10/22/2007 8:54:49 AM
What you may do is to calculate the count of detail records via summary column, say [# Details], and set up custom access rule for master table's delete to check for [# Details] = 0. This will disable delete operation from master while detail records are existing.
Fabio Cardillo 3/5/2010 2:54:23 PM
Should Be nice to have option Delete Cascade for delete Itens on related tables.

Example:

When deleting an Order, the Order Detail related to that order in the Order Detail Table should be deleted too.
Ben Fatchen 3/6/2010 8:06:48 PM
It would also be great to be able to copy cascading records when sing "Add similar" function.
Philipp Matuschka 3/8/2010 4:52:34 AM
When looking at this, consider also how to deal with multi layer cascades. Relationships can be more than one layer deep.
Fabio Cardillo 3/31/2010 1:34:27 PM
I think this item is covered from Idea:

Cascading referential integrity constraints for one-to-many relations

posted by Slava Shinderov

regards
Slava Shinderov  Staff  4/15/2010 6:39:07 AM
Merged with:
320 - Deleting Cascade Itens
Fabio Cardillo 4/15/2010 6:49:00 AM
Is there Any possibility to promote this intem again ? :-)
Paul O'Brien 11/4/2011 3:28:39 PM
This is also necessary in many-to-many relationships where a "link" table is used. When you delete one of the linked rows on either side of the relationship, the corresponding row in the link table needs to be deleted. Currently you end up with an "orphaned" row in the link table.

I created a little work around by checking the link values in the link table and if one is missing setting an "orphaned" column. You can then set your views to ignore those records if they are tagged as being orphaned.
Fabio Cardillo 3/13/2012 12:53:31 PM
Any news about this Idea ?
Arnold Hakobyan 4/15/2012 2:25:14 AM
It is more needed when one tries to modify something and wants to have all related to that updated too.
Simon Petralli 7/16/2012 2:40:44 AM
Looking forward to this function... any news?
martin oliver 1/20/2013 10:05:59 AM
Would it not be possible to create a workflow action allowing for a record to be deleted where the workflow trigger that created a record is deleted
martin oliver 1/20/2013 10:12:04 AM
"where the workflow trigger that created the record is deleted" should read .... where the record that workflow triggered is deleted.
Rick Cogley 12/10/2013 3:15:40 AM
I'm definitely still interested in this.
Desmond Beatty (Conc) 12/10/2013 4:48:55 AM
I'm with Rick on this. I have a project to manually implement Kirill's workaround - If RecCountAnyChildren > 0 then prevent delete. This is "unproductive" effort for something that should, IMHO, be a supported in some standard way by the platform.
Luison Lassala 1/10/2014 3:37:20 PM
We need it: It's a no-brainer!

I deleted a parent record from a table and had expected that all the associated child records from other tables would also have been deleted; or at least that I would be given the option.

Other db systems allow you to indicate this setting (how to deal with deletion of Master records and how they affect associated Detail records) when you establish a relationship between tables.
basenine 1/11/2014 12:23:26 AM
It's the one workflow action missing that would be beneficial. The ability to delete records via a workflow (on top of this idea) would be beneficial. Obvious restraints would need to be administered (i.e. who (User Property) has the authority to action such request). A Special Recycle Bin and email notification to those necessary might be further security/continuity of data and records. An ability to "Put it all back" if a mistake is made, as well.

If a window popped up with "Hey - Knucklehead! This is all the data that will be deleted when you proceed.." perhaps (!)
rishi uttam 3/27/2015 2:56:55 AM
Basenine, i like the "Hey - Knucklehead! idea....

Redundancy would also be nice to pull it all back (master and childs) in one lot.

Rafael Muñiz 9/14/2015 3:15:11 PM
With this funcionallity implemented, will be possible to modify any field from details tables, by pushing a buttom from their parent table? or may be adding a similar record, with their childs records, in one step, without having to select them manually?

I saw this funcionallity in other apps, like Teamdesk, and as far as I can see, with my poor knowledge, I consider this as a "Must".

If this is not that important, I really would like to know how to do it, avoiding the manual selection of childs records.

Thanks
Rafael
Feedback
 
Back to Search Results