Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with where clause #2328

Closed
kogutu opened this issue Feb 1, 2019 · 1 comment
Closed

Problem with where clause #2328

kogutu opened this issue Feb 1, 2019 · 1 comment

Comments

@kogutu
Copy link

kogutu commented Feb 1, 2019

Description / Steps to reproduce / Feature proposal

Hello, I have problem with where clause on LB4. When I use JSON as discribe where clause, LB4 return undefined value (I check on controller filter value) , Explorer return request url without filter query parameters.

Ex. this below query is working
{ "where": "1" }
return this url (on explorer): http://localhost:3100/test?filter[where]=1
and this value on controller:
{ where: '1' } or { "where": '1' }

But when i try use correctly query
{ where: {id:"1"} } or { "where": {"id":"1"} }
LB4 return: http://localhost:3110/test and undefined value on controller

I use graphql but this problem there is also exist when i try use where clause on explorer.

On this place I observe filter query:

@get('/test', { responses: { '200': { description: 'Array of test model instances', content: { 'application/json': { schema: {type: 'array', items: {'x-ts-type': Test}}, }, }, }, }, }) async find( @param.query.object('filter', getFilterSchemaFor(Test)) filter?: Filter, ): Promise<Test[]> { **console.log(filter);** return await this.testRepository.find(filter);

Please tell me what I am doing wrong?

@raymondfeng
Copy link
Contributor

Duplicate of #2208 (comment)

@raymondfeng raymondfeng marked this as a duplicate of #2208 Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants