loopbackio / loopbackio/loopback-next

lb4 discover model is correct,but when i use this model ,return data's type is error that not what I need this type

Open
#9,140 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

### Describe the bug

`
@property({
type: 'number',
required: true,
scale: 0,
postgresql: {
columnName: 'node_parent',
dataType: 'bigint',
dataLength: null,
dataPrecision: null,
dataScale: 0,
nullable: 'NO',
},
})
nodeParent: number;`

**I use postgreSQL DB and use lb4 discover, correct to create the last one item,but when i use this model,it return data‘s is error ;I need return number,but it return string type ,for e.g.**

`PermissionMenu {
id: undefined,
nodeName: undefined,
nodeType: undefined,
nodeParent: '123123123',
parentNodes: undefined,
seq: undefined,
description: undefined,
cssExt: undefined
}`

### Logs

_No response_

### Additional information

_No response_

### Reproduction

Occasional problem

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or reliable reproduction is provided. Start at the lb4 discover path for PostgreSQL bigint fields and reproduce the reported nodeParent value; done means the discovered model consistently returns the expected numeric type, with regression coverage if the relevant test area is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.