Closed david8640 closed 10 years ago
@aassaly @omarhijazi22
I tried to fix the problem with the category with the implementation of the reference (http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/) everything is working except the edition of a category. I decided to add this solution in the folder Database scripts/CategoryHierarchicalImplementation but i'm not using this solution in our project because of the problems in the implementation of the edition.
I fix the problem in the current solution by adding a validation of 3 levels of self loop (1, 2, 3) and i also modify to constraint to put NULL in the parent field of a child if we delete the parent. This will fix the problem for the moment if the client need an implementation similar to the hierarchical one propose by the reference we will have to work on the edition function to make it work properly.
I Also fix a problem with incrementation and decrementation of the order field on the delete action.
Can you review this bug plz ?
@aassaly @omarhijazi22
Nous avons présentement une implémentation fonctionnelle des catégories. Par contre, celle-ci permet de faire un loop de catégorie et de ne plus être capable de supprimer les dites catégories. Voici un exemple :
cat 1 (parent) -> cat 2 (enfant) -> cat 1 (son parent) => engendre qu'on ne peut plus supprimer cat 1 et cat 2 ils ont des enfants.
J'ai déjà trouvé une solution à ce problème. Par contre, il va falloir prendre le temps de faire l'implémentation de la solution.
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/