loopbackio / loopbackio/loopback-connector-sqlite3

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

Offen
#37 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
13
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den LoopBack 3-Fall, indem du ein Modell mit einem String-id und uuid defaultFN erstellst und dann über den REST API Explorer eine neue Instanz per PUT sendest. Vergleiche die PUT-Antwort mit der id, die beim Auflisten von Instanzen über GET zurückgegeben wird; abgeschlossen ist die Aufgabe, wenn die PUT-Antwort die generierte UUID statt einer Ganzzahl zurückgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, sqlite
Bereich
databases
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.