Skip to content

LB4 no longer supports inqLimit for Includes. #8773

@cuttingd

Description

@cuttingd

Describe the bug

We are migrating from lb3 to lb4 and we encountered an oracle error (Error: ORA-01795: maximum number of expressions in a list is 1000) when using an Include for one of our queries. This is as a result of the fact that it appears that lb4 no longer supports the inqLimit property on the datasource and therefore is not splitting the queries into multiple queries.

Logs

Request GET /routes?filter=%7B%22include%22:%5B%7B%22relation%22:%22connection%22,%22scope%22:%7B%22include%22:%5B%7B%22relation%22:%22partner%22%7D,%7B%22relation%22:%22sftpProfile%22%7D%5D%7D%7D,%7B%22relation%22:%22partner%22%7D,%7B%22relation%22:%22product%22,%22scope%22:%7B%22include%22:%5B%7B%22relation%22:%22program%22,%22scope%22:%7B%22include%22:%5B%7B%22relation%22:%22portfolio%22%7D%5D%7D%7D%5D%7D%7D,%7B%22relation%22:%22notifications%22,%22scope%22:%7B%22include%22:%5B%7B%22relation%22:%22contact%22%7D%5D%7D%7D,%7B%22relation%22:%22routeContacts%22,%22scope%22:%7B%22include%22:%5B%7B%22relation%22:%22contact%22%7D%5D%7D%7D%5D%7D failed with status code 500. Error: ORA-01795: maximum number of expressions in a list is 1000
mft-loopback/node_modules/@loopback/rest/dist/providers/log-error.provider.js:17
Request GET /routes?filter={%22include%22:[{%22relation%22:%20%22connection%22}]} failed with status code 500. Error: ORA-01795: maximum number of expressions in a list is 1000

Additional information

No response

Reproduction

I have no publicly available repo for reproducing this but it is an obvious issue as noted in this spike: https://github.com/loopbackio/loopback-next/blob/spike/resolve-included-models/_SPIKE_.md

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions