loopbackio / loopbackio/loopback-next

lb4 discover does not handle BLOB fields

Ouverte
#6,295 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug db:MySQL db:Oracle db:PostgreSQL good first issue Hacktoberfest help wanted Model Discovery
Langage dominant
TypeScript
Étoiles
5.1k
Forks
1.1k
Merge moyen
2 j 21 h
PR mergées (30 j)
27

Description

## 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

```ts
@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](http://loopback.io/doc/en/contrib/Reporting-issues.html) for more tips on writing good issues_

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Start by reproducing the issue with lb4 discover against a MySQL table containing a BLOB field, then inspect the generated TypeScript model shown in the report. Verify that BLOB is mapped to Buffer rather than the undefined Binary type and that the generated model compiles and starts successfully.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
mysql, typescript
Domaine
database
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.