jarrodconnolly / sequelize-slugify

Sequelize Slugify is a plugin for the Sequelize ORM that automatically creates and updates unique, URL safe slugs for your database models.
https://sequelize-slugify.nestedquotes.ca/
MIT License
56 stars 27 forks source link

Not working with bulkCreate #20

Closed fnematov closed 3 years ago

fnematov commented 5 years ago

hi, I use like this let slugify = require('sequelize-slugify');

slugify.slugifyModel(Nomenclatures, {
        source: ['name'],
        slugOptions: { lower: true },
        overwrite: false,
        column: 'slug'
    });

In my case slug can not be null await model.bulkCreate(json_data);

It gives me an error slug can not be null

jarrodconnolly commented 3 years ago

bulkCreate() should be working, there is a unit test as of #51 https://github.com/jarrodconnolly/sequelize-slugify/blob/main/jest-tests/slug-bulk-update.test.js