loopbackio / loopback-connector-sqlite3

SQLite3 Connector for LoopBack
Other
13 stars 22 forks source link

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

Open johnsoftek opened 7 years ago

johnsoftek commented 7 years ago

Bug or 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)