loopbackio / loopback-connector-sqlite3

SQLite3 Connector for LoopBack
Other
13 stars 22 forks source link

PUT endpoint does not return correct id (maybe rowid?) #37

Open danscully opened 6 years ago

danscully commented 6 years ago

Bug or feature request

Description of feature (or steps to reproduce if bug)

Create a model with an id as type "string", and a defaultFN of "uuid". PUT a new instance using the REST api through explorer. The response body will show an integer id (presumably an integer that corresponds to the ROWID or something like that). Now use the GET api to list all model instances. The instance will show an id in the correct uuid format.

Link to sample repo to reproduce issue (if bug)

Expected result

I'm assuming the response body should reflect the id generated by defaultFN.

Actual result (if bug)

Its an integer.

Additional information (Node.js version, LoopBack version, etc)

Loopback 3, node 8.11.2

I'm anticipating a reply of "why are you using a string for a key?" The answer is complicated based in integration with a larger project. If the answer is "we don't support that" we'll make it work, but I wanted to check to make sure. Thanks