Skip to content

Exception when object field not included in fields list of find or findOne #34

Open
@johnsoftek

Description

@johnsoftek

Bug or feature request

  • [X ] Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

  1. Define a model with {field1: {type: 'number}, field2: {type: object'}}
  2. Create a model record
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions