PUT endpoint does not return correct id (maybe rowid?)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, sqlite
- Domain
- databases
Research direction
Reproduce the LoopBack 3 case by creating a model with a string id and uuid defaultFN, then PUT a new instance through the REST API Explorer. Compare the PUT response with the id returned when listing instances through GET; done means the PUT response returns the generated UUID rather than an integer.
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)
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
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
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
-
feature
loopbackio/loopback-connector-sqlite3#51 · 1 assignee ·
-
Transaction types Openfeature
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
backlog 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·