loopbackio / loopbackio/loopback-connector-sqlite3

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

オープン
#37 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
13
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

string id と uuid defaultFN を持つモデルを作成し、REST API Explorer を通じて PUT で新しいインスタンスを送信して、LoopBack 3 のケースを再現します。GET を通じてインスタンスを一覧表示したときに返される id と PUT のレスポンスを比較します。完了条件は、PUT のレスポンスが整数ではなく生成された UUID を返すことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, sqlite
領域
databases
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。