Skip to content

belongsToMany limit / offset broken with tedious #64

@schie

Description

@schie

The following bit of code added by pull request #55 does not work for Sequelize v3 BelongsToMany associations with tedious when including both limit and offset:

const limit = findOptions.offset && findOptions.offset > 0 ? [findOptions.limit, findOptions.offset] : findOptions.limit;

The query that is built with a limit of 10 and an offset of 2 will contain the following:

-- rest of qurey
 OFFSET 0 ROWS FETCH NEXT 10,2 ROWS ONLY

Instead of the expected:

 OFFSET 2 ROWS FETCH NEXT 10 ROWS ONLY

Any thoughts regarding resolution?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions