Allow ManyToMany Duplications on Symfony 5 (Doctrine) - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Wednesday, August 31, 2022

Allow ManyToMany Duplications on Symfony 5 (Doctrine)

I have a problem, it's for a school project and I need to allow duplications of the same relation between two entities on my app using Symfony 5 & Doctrine & postgresql .

I have a basicly a ManyToMany relation between Order and Products, I don't want to add fields for quantity, so I'm looking to count the number of occurences of the a same relation id_order & id_product on my order_product table, but I can't persist more than one same relation between order & product.

I searched and mainly saw people tryng to avoid duplications of the same relation, i'm looking for the exact contrary.

Thx



source https://stackoverflow.com/questions/73546910/allow-manytomany-duplications-on-symfony-5-doctrine

No comments:

Post a Comment