domasx2 / sequelize-fixtures

Load data from json, yaml or js to sequelize
301 stars 83 forks source link

Cast value to JSON for correct comparisions #136

Open afonso360 opened 2 years ago

afonso360 commented 2 years ago

Hey,

It looks like MySQL (8.0) has trouble comparing JSON fields with the string without casting. This PR casts json strings to the JSON type before comparing, so that we don't get duplicates.