loopbackio / loopbackio/loopback-next
lb4 discover does not handle BLOB fields
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 1.1k
- Merge medio
- 2g 21h
- PR unite (30g)
- 27
Descrizione
## 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_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- mysql, typescript
- Ambito
- database
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100