Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sequelize] Table is not created with omitNull option #267

Closed
dextto opened this issue Aug 30, 2020 · 2 comments
Closed

[Sequelize] Table is not created with omitNull option #267

dextto opened this issue Aug 30, 2020 · 2 comments

Comments

@dextto
Copy link

dextto commented Aug 30, 2020

Bug Report

Current behavior

I want to remove tedious @AllowNull(false) decorators, and I found a solution here.
But Table is not created with omitNull option.

Input Code

const models = [DefaultAccount, Account];

account.module.ts

@Module({
  imports: [
    SequelizeModule.forFeature(models, { omitNull: true }),
  ],
  controllers,
  providers: [
  ],
})
export class AccountModule { }

Expected behavior

Table should be created, and all fields should be NOT NULL.

Possible Solution

Environment


[System Information]
OS Version     : macOS Catalina
NodeJS Version : v12.16.1
NPM Version    : 6.14.8

[Nest CLI]
Nest CLI Version : 7.4.1

[Nest Platform Information]
platform-express version : 7.4.2
sequelize version        : 0.1.1
passport version         : 7.1.0
swagger version          : 4.6.0
common version           : 7.4.2
config version           : 0.5.0
core version             : 7.4.2
cqrs version             : 7.0.1
jwt version              : 7.1.0

 
Others:

@jmcdo29
Copy link
Member

jmcdo29 commented Aug 30, 2020

Nest doesn't modify the options passed in and sends them directly to Sequelize. If you're facing a problem with it can you provide a minimum reproduction?

@kamilmysliwiec kamilmysliwiec transferred this issue from nestjs/nest Aug 30, 2020
@kamilmysliwiec
Copy link
Member

Please, report this issue in the sequelize repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants