Sequelize-typescript: Using separate option

Created on 5 Oct 2017  路  3Comments  路  Source: RobinBuschmann/sequelize-typescript

Hi, I have queries with several includes and has many relations of rows where at the end I am getting cartesian product and is slow. Looking for, I see that with Sequelize I can use separate:true in includes (https://github.com/sequelize/sequelize/pull/4177), but dont see it in your package. How can I use it?

Thanks

Most helpful comment

Hey @oscarcalvo thanks for reporting this. separate: boolean needs to be added to the IIncludeOptions.

For now you can make the compiler happy with this:

{
  include: [{
    ['separate' as any]: true,
  }]
}

(This seems to be missing on the sequelize typings as well)

All 3 comments

Hey @oscarcalvo thanks for reporting this. separate: boolean needs to be added to the IIncludeOptions.

For now you can make the compiler happy with this:

{
  include: [{
    ['separate' as any]: true,
  }]
}

(This seems to be missing on the sequelize typings as well)

ok thanks you

why is this closed ? please re-open. this option was not added.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samanmohamadi picture samanmohamadi  路  5Comments

KAMAELUA picture KAMAELUA  路  4Comments

lverledens picture lverledens  路  4Comments

bschveitzer picture bschveitzer  路  5Comments

mikew picture mikew  路  4Comments