Hi all
I'm trying to build my practice db environment in MySQL.
but how can I insert data into association tables and check if unique(or specific) field has duplicate value?
here are two situation
1. project sale new product (insert both)
2. project sale product, and the product was registed.
I defined two models, set initial data into Product and associated them though "project_product" like following configure:
here is my current code:
then, I insert a data with duplicate product name like:
but it would occur SequelizeUniqueConstrainError exception here.
how can I insert data into association tables and check if unique(or specific) field has duplicate value?