Exception when object field not included in fields list of find or findOne
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, sqlite
- Domain
- database
Research direction
Start by reproducing the issue in the linked loopback-connector-sqlite3 sample with a model containing a number and object field, then trace the find and findOne entry points when only field1 is requested. Done means retrieving the record with fields: ['field1'] completes without the JSON parsing exception.
Written by the indexing model from the issue text.
Description
Bug or feature request
- [X ] Bug
- Feature request
Description of feature (or steps to reproduce if bug)
- Define a model with {field1: {type: 'number}, field2: {type: object'}}
- Create a model record
- Retrieve the model record with fields: ['field1']
Link to sample repo to reproduce issue (if bug)
https://github.com/aams/loopback-connector-sqlite3
Expected result
No crash
Actual result (if bug)
Exception "Uncaught SyntaxError: Unexpected token u in JSON at position 0"
Additional information (Node.js version, LoopBack version, etc)
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Getting set up
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.
More from loopbackio/loopback-connector-sqlite3
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Support referential integrityMay be free again @achrinza claimed this 1491 days ago, and no pull request is open. Openfeature
loopbackio/loopback-connector-sqlite3#51 · 1 assignee ·
-
Transaction typesOpenfeature
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Loopback 4: HasManyThrough-Relation is not workingMay be free again @achrinza claimed this 1708 days ago, and no pull request is open. Openbacklog bug
loopbackio/loopback-connector-sqlite3#46 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
loopbackio/loopback-connector-sqlite3#43 · 1 comment ·
All issues in loopbackio/loopback-connector-sqlite3
Similar issues
-
Complexity: Small P-Feature: Projects page ready for merge team role: back end/devOps role: front end size: 0.25pt
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
bellingcat/toolkit#905 ·
-
self-care self-care:docs-build-time-investigator
Difficulty 2/5 Half a day Newbie friendliness 76/100
githubnext/gh-aw-cao#14191 ·
Maintainers usually reply within 1 day
-
effort:low impact:medium RAG status: auto-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mastra-ai/mastra#25229 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sugarlabs/musicblocks#8984 ·
Maintainers usually reply within 1 day