MaddyUnderStars / MaddyUnderStars/shoot
use `BaseEntity.insert` instead of `.save()` for new rows
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 61
- Forks
- 5
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 1
Description
`.save()` executes a select first to see if it's truly new, which isn't necessary e.g. for user registration.
Either move to `Entity.insert(Entity.create({})` or add `insert` alias to BaseEntity and call that?
Contributor guide
No contributing guide indexed for this repository
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 BaseEntity and the user-registration call site that currently uses .save(), then compare the available Entity.insert approach with the existing persistence flow. The change is complete when new-row registration no longer performs the unnecessary select while preserving the current behavior and passing the repository's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100