Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

"or" and "and" operators do not works #216

Open
Fr4nZ82 opened this issue Jun 17, 2020 · 1 comment
Open

"or" and "and" operators do not works #216

Fr4nZ82 opened this issue Jun 17, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@Fr4nZ82
Copy link

Fr4nZ82 commented Jun 17, 2020

Describe the bug

Do not know if is a feature request or a bug, but queries with filters like where: { and: [ { item: 'somestring' }, { deleted: false } ] } do not works.

error Error: Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.
    at Function.Query.validateQueryEndpoints_ (C:\myproject\node_modules\@firebase\database\src\api\Query.ts:138:15)
    at Query.startAt (C:\myproject\node_modules\@firebase\database\src\api\Query.ts:509:11)
    at Query.equalTo (C:\myproject\node_modules\@firebase\database\src\api\Query.ts:574:17)
    at RealtimeDatabase.queryData (C:\myproject\node_modules\loopback-connector-realtime-database\lib\realtime-database.js:81:10)
    at RealtimeDatabase.all (C:\myproject\node_modules\loopback-connector-realtime-database\lib\realtime-database.js:57:33)
    at invokeConnectorMethod (C:\myproject\node_modules\loopback-datasource-juggler\lib\dao.js:172:21)
    at C:\myproject\node_modules\loopback-datasource-juggler\lib\dao.js:1730:7
    at doNotify (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:157:49)
    at doNotify (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:157:49)
    at Function.ObserverMixin._notifyBaseObservers (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:180:5)
    at Function.ObserverMixin.notifyObserversOf (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:155:8)
    at Function.ObserverMixin._notifyBaseObservers (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:178:15)
    at Function.ObserverMixin.notifyObserversOf (C:\myproject\node_modules\loopback-datasource-juggler\lib\observer.js:155:8)
    at Function.find (C:\myproject\node_modules\loopback-datasource-juggler\lib\dao.js:1728:10)
    at Function.findOne (C:\myproject\node_modules\loopback-datasource-juggler\lib\dao.js:1775:8)
    at UserRepository.findOne (C:\myproject\node_modules\@loopback\repository\src\repositories\legacy-juggler-bridge.ts:405:23)
    at UserController.register (C:\myproject\src\controllers\user.controller.ts:236:53)
@henriquecarv henriquecarv added the enhancement New feature or request label Jun 19, 2020
@henriquecarv
Copy link
Owner

It hasn't been implemented in this connector yet.

I will try to look at it when I have some time, but feel free to attempt a solution for this. I am sure, a lot of people could also benefit from it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants