loopbackio / loopbackio/loopback-next
Allow Class/Model Name to Have A Different Name From the Database Table
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Description / Steps to reproduce / Feature proposal
Create/map a class/model with a name different from the name in its MySQL table
Current Behavior
If the class name is different, there is no way to map it to the correct table having a different name.
Expected Behavior
Just like individual properties inside the class, a class/model should be allowed to be exposed with a custom name different from that in the database table.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript model-to-table mapping and the MySQL integration points in the repository. Review existing mapping behavior and tests before defining the change; it is done when a model with a different class name can map to its intended table without breaking property mappings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, typescript
- Domain
- backend-api-design, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100