Welcome Guest, Not a member yet? Register   Sign In
DMZ unwanted house cleaning
#1

[eluser]TomMRiddle[/eluser]
We have used DMZ latest version on a rather big project and noticed that the house cleaning is unlinking deleted objects to related tables. I understand that this may be desirable if you use MyISAM where there are no foreignkey support but we use InnoDB and use on delete cascade on stuff that should clean itself.

When DMZ does its house cleaning it completely breaks the on delete cascade behavior because the objects are no longer related so we have to tell DMZ to delete the related object before deleting the "parent" object. we can live with this but it got us really irritated at DMZ when we realized what it was doing. is there a way to turn off house cleaning?
#2

[eluser]WanWizard[/eluser]
Datamapper does NOTHING on it's own. It does what it's programmed to do. If you use database mechanisms, whether you're using constraints or triggers, YOU are bypassing Datamappers logic.

If you want the option to alter Datamappers logic in this respect, please add a feature request at http://bitbucket.org/wanwizard/datamapper/issues.


edit: new config value 'cascade_delete' implemented (global, per model, or per relationship definition), default enabled. Set to FALSE to disable it. Download at https://bitbucket.org/wanwizard/datamapper/get/tip.zip.
#3

[eluser]TomMRiddle[/eluser]
Thank you for the cascade_delete "powerswitch" much appriciated.
#4

[eluser]WanWizard[/eluser]
Thanks.

I see the need for a feature like this once you move on to a "more professional" database design.
#5

[eluser]WanWizard[/eluser]
?
#6

[eluser]bEz[/eluser]
I'm curious, what is the "?" in your previous post referring to WanWizard?
#7

[eluser]WanWizard[/eluser]
There was a rubbish post before mine, which seems to be removed (maybe a spammer?)...




Theme © iAndrew 2016 - Forum software by © MyBB