loopbackio / loopbackio/loopback-next

lb4 discover does not handle BLOB fields

Offen
#6,295 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug db:MySQL db:Oracle db:PostgreSQL good first issue Hacktoberfest help wanted Model Discovery
Vorherrschende Sprache
TypeScript
Sterne
5.1k
Forks
1.1k
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
27

Beschreibung

Steps to reproduce

To reproduce this problem use lb4 discover in a MySQL table having a BLOB field. It will generate a model where BLOB is mapped to binary and does not start.

Current Behavior

The lb4 discover blob fields as binary fields

Expected Behavior

Blob fields should be discovered as buffer type.

Link to reproduction sandbox

Additional information

The created model property is like

  @property({
    type: 'Binary',
    required: true,
    length: 65535,
    mysql: {columnName: 'photo', dataType: 'blob', dataLength: 65535, dataPrecision: null, dataScale: null, nullable: 'N'},
  })
  // Binary is not defined so compiler fails
  // it should be Buffer
  photo: Binary;

Related Issues

No similar issues found.

See Reporting Issues for more tips on writing good issues

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

Beginne damit, das Problem mit lb4 discover anhand einer MySQL-Tabelle zu reproduzieren, die ein BLOB-Feld enthält, und prüfe anschließend das im Bericht gezeigte generierte TypeScript-Modell. Überprüfe, dass BLOB statt des nicht definierten Typs Binary auf Buffer abgebildet wird und dass das generierte Modell erfolgreich kompiliert und gestartet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
mysql, typescript
Bereich
database
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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