Answer the question
In order to leave comments, you need to log in
How to save tags to something?
For example, goods are stored in one table. You can then add a tag to each. There is a separate table for tags. For communication product tags the third table. During post-moderation, you need to remove a certain tag.
* delete tag
* delete product-tag links
Problem when selecting a list of products. One request does not work - for 50 products, 50 requests for tags. Do denormalization for the list of tags of each product - then when the tag is deleted (moderation), this table is difficult to update, and there may be a data discrepancy. How is this solved in Symfony+Doctrine?
Answer the question
In order to leave comments, you need to log in
Denormalizing tags is insanity IMHO.
* delete tag
* delete product-tag links
Use foreign keys with CASCADE on DELETE.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question