Skip to content

inject sequelize instance issue #31

Open
@Mahmaddz

Description

@Mahmaddz

I tried to inject sequelize instance to create new transaction. but its not working. here is my code

@Inject(SEQUELIZE) private readonly sequelize: Sequelize,
provider code
`

import { Sequelize } from 'sequelize-typescript';

{
  provide: SEQUELIZE,
  useValue: Sequelize,
},

`

//transection code

const transaction = await this.sequelize.transaction();

and getting this error

TypeError: this.sequelize.transaction is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions