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

findById returns keys with undefined when fields filter is array #117

Closed
irfankhan-sf opened this issue Jan 13, 2023 · 1 comment
Closed
Assignees

Comments

@irfankhan-sf
Copy link

Describe the bug
findById returns keys with undefined when fields filter is array. if fields filter is array it return empty object

To Reproduce
Steps to reproduce the behavior:

  1. Create a filter using loopback "fields" filter, fields with array of property. For example:-
    fields: [ "id", "header", "content"],
  2. when we call findById with this fields filter
  3. The object keys with undefined values will returned
    returned values: {id:undefined, header: undefined, content: undefined }

Expected behavior
It should return object with keys that we pass with fields with array

prernagp added a commit to prernagp/loopback4-soft-delete that referenced this issue Feb 9, 2023
…f findbyid

added checks for fields passed as an array in function findById.

sourcefuseGH-117
yeshamavani pushed a commit that referenced this issue Feb 14, 2023
…f findbyid (#122)

added checks for fields passed as an array in function findById.

GH-117
@yeshamavani
Copy link
Contributor

done

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

3 participants