loopbackio / loopbackio/loopback-next
Where filter with `neq` doesnot work as expected
Aperta
@hacksparrow ci sta già lavorando.
Dal 20/10/2020.
bug
needs steps to reproduce
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 1.1k
- Merge medio
- 2g 21h
- PR unite (30g)
- 27
Descrizione
Steps to reproduce
- Create a entity has
idproperty as the following
class Sample extends Entity {
@property({
type: 'string',
id: true,
generated: true,
})
id?: string;
// other properties
}
- Make a query to find samples that not equal the
id. For example
const id = '5f7f32799f3b8031a56e4ca8';
const result = this.sampleRepositoy.find(
{
where: {
id: {
neq: id
}
}
}
)
Current Behavior
result still has the entity with id='5f7f32799f3b8031a56e4ca8'
Expected Behavior
result should exclude the id that I used to filter.
I am using mongo with package: "loopback-connector-mongodb: 5.3.0"
Everything will work if I try to install "mongodb" package and replace neq: id with neq: new ObjectId(id)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.