rcxwhiz / django-hierarchical-models

MIT License
1 stars 0 forks source link

Change saving behavior #37

Closed rcxwhiz closed 3 months ago

rcxwhiz commented 3 months ago

When I started this project, I thought it would be much more convenient for all the methods to automatically save and update. I realize now that this was a super massive performance issue, and honestly not even very intuitive behavior. I think it would be right to go back and remove any automatic saving or refreshing. Sadly(?), this might pave the way to actually redo those other implementations.

rcxwhiz commented 3 months ago

The issue I could foresee with this is that for the other types of models, you are tempted to refresh some things, like for example: if you tried to do set_parent with an out of date model in NSM, you could kind of ruin the whole database or have weird errors. People might not understand that they need to refresh their instances because things might have side effects they do not expect. With NSM every single instance of a model could be updated by one edit, and people probably won't understand that editing one instance means you need to refresh every single instance you have to get the correct hierarchical data. This seems to defeat the purpose of the improved implementations.

Regardless, I should probably eliminate the automatic saving from the model. This is not intuitive or standard.