Skip to content

Check for references when deleting nodes .. ? .. #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dantleech opened this issue Oct 22, 2014 · 3 comments · Fixed by #110
Closed

Check for references when deleting nodes .. ? .. #107

dantleech opened this issue Oct 22, 2014 · 3 comments · Fixed by #110
Milestone

Comments

@dantleech
Copy link
Member

We can then not attempt to persist them and fail on session save.

@dbu
Copy link
Member

dbu commented Oct 22, 2014

makes sense. i see this feature as a last resort, like sql foreign keys. they prevent data inconsistency, but the application (e.g. the shell) should check itself and provide more helpful information.

we might even ask the user whether he wants to delete those nodes (though those again might be referenced and so on). doing a force delete recursive cascade sounds like an excellent way to ditch half of your database. the other option would be to delete just the referencing property value, but whether that is a good idea depends on the data model...

@dantleech
Copy link
Member Author

regarding user not deleting their entire content tree by accident, I think it would be good to be able to review the changes before comitting a save. Either by wrapping the API session or by using the Jackalope feature if available.

e.g.

PHPCRSH> save
[ 1234 nodes will be affected, do you want to (y) continue, (n) stop, or (r) review ]
n

(related to #71)

@dantleech
Copy link
Member Author

Will be fixed by #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants