loopbackio / loopbackio/loopback-next
[@loopback/sequelize] Attempting to use `options` in a `where` filter leads to "There is no equivalent operator" exception
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Describe the bug
This section of the code throws an exception if the "where" filter includes an "options" key: https://github.com/loopbackio/loopback-next/blob/96b9a56788937f081e61f1d48dc080c7233d394c/extensions/sequelize/src/sequelize/sequelize.repository.base.ts#L604
Example filter that will throw an exception:
where: {
name: {
like: '%abcdefg%',
options: 'i'
}
}
References:
Logs
No response
Additional information
No response
Reproduction
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at extensions/sequelize/src/sequelize/sequelize.repository.base.ts around line 604 and compare the failing where filter with the documented operators. Determine the expected handling of the options key, then verify that the example filter no longer raises the “There is no equivalent operator” exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100