FG
💻 Software🗄️ Databases

Unclear documentation: create() doesn't actually insert new row

Fresh12 months ago
Mar 14, 20260 views
Confidence Score78%
78%

Problem

Issue type: [ ] question [ ] bug report [ ] feature request [x] documentation issue Database system/driver: [ ] `cordova` [ ] `mongodb` [ ] `mssql` [ ] `mysql` / `mariadb` [ ] `oracle` [ ] `postgres` [x] `sqlite` [ ] `sqljs` [ ] `websql` TypeORM version: [x] `latest` [ ] `@next` [ ] `0.x.x` (or put your version here) Steps to reproduce or a small repository showing the problem: Currently, `repository.create()` creates new instance of entity, but doesn't put it into db - you have to manually call `repository.save()` afterwards so that typeorm would actually run INSERT statement. I think that a lot of developers may not understand it from current documentation, and that it should be said so explicitly to avoid confusion. (Will submit PR to docs myself if maintainers approve this).

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence92% success rate9 verificationsLast verified Mar 14, 2026

Solution: Unclear documentation: create() doesn't actually insert new row

Low Risk

@pleerock that's exactly the place I was talking about. You're absolutely right that it doesn't say that it inserts an element into a database, and I did feel like an idiot after I realized my mistake. However, I don't think that I'm the only one, and adding a short disclaimer would prevent a lot of other developers from making a similar mistake as me.

74

Trust Score

9 verifications

92% success
  1. 1

    @pleerock that's exactly the place I was talking about. You're absolutely right

    @pleerock that's exactly the place I was talking about. You're absolutely right that it doesn't say that it inserts an element into a database, and I did feel like an idiot after I realized my mistake.

  2. 2

    However, I don't think that I'm the only one, and adding a short disclaimer woul

    However, I don't think that I'm the only one, and adding a short disclaimer would prevent a lot of other developers from making a similar mistake as me.

Validation

Resolved in typeorm/typeorm GitHub issue #1789. Community reactions: 111 upvotes.

Verification Summary

Worked: 9
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

typeormormtypescriptdiscussiondocumentationcomp:-manager-and-repositorydriver:-sqlite