loopbackio / loopbackio/loopback-connector-sqlite3
PUT endpoint does not return correct id (maybe rowid?)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 13
- Fork
- 21
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện trường hợp LoopBack 3 bằng cách tạo một model với id kiểu string và uuid defaultFN, sau đó gửi một instance mới qua PUT trong REST API Explorer. So sánh phản hồi PUT với id được trả về khi liệt kê các instance qua GET; được xem là hoàn tất khi phản hồi PUT trả về UUID đã tạo thay vì một số nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, sqlite
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100