title: What the difference between save and insert when wanting to create new record in TypeORM
body: <p>What is the difference between <code>.save()</code> and <code>.insert()</code> in the <code>Repository</code> when wanting to create a new record?</p>
  <p>In the code, the <a href="https://github.com/typeorm/typeorm/blob/b6c828cc6c9786c155165d97e1f21af7cf423075/src/repository/Repository.ts#L224-L232" rel="noreferrer">comment</a> for <code>.insert()</code> is:</p>
  <pre><code>// From https://github.com/typeorm/typeorm/blob/b6c828cc6c9786c155165d97e1f21af7cf423075/src/repository/Repository.ts#L224-L232
  
  
      /**
       * Inserts a given entity into the database.
       * Unlike save method executes a primitive operation without cascades, relations and other operations included.
       * Executes fast and efficient INSERT query.
       * Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
       */
      insert(entity: QueryDeepPartialEntity&lt;Entity&gt;|(QueryDeepPartialEntity&lt;Entity&gt;[])): Promise&lt;InsertResult&gt; {
          return this.manager.insert(this.metadata.target as any, entity);
      }
  </code></pre>
  <p>In the code, the <a href="https://github.com/typeorm/typeorm/blob/b6c828cc6c9786c155165d97e1f21af7cf423075/src/repository/Repository.ts#L140-L151" rel="noreferrer">comment</a> for <code>.save()</code> is:</p>
  <pre><code>// From https://github.com/typeorm/typeorm/blob/b6c828cc6c9786c155165d97e1f21af7cf423075/src/repository/Repository.ts#L140-L151
  
      /**
       * Saves a given entity in the database.
       * If entity does not exist in the database then inserts, otherwise updates.
       */
      save&lt;T extends DeepPartial&lt;Entity&gt;&gt;(entity: T, options?: SaveOptions): Promise&lt;T &amp; Entity&gt;;
  
      /**
       * Saves one or many given entities.
       */
      save&lt;T extends DeepPartial&lt;Entity&gt;&gt;(entityOrEntities: T|T[], options?: SaveOptions): Promise&lt;T|T[]&gt; {
          return this.manager.save&lt;Entity, T&gt;(this.metadata.target as any, entityOrEntities as any, options);
      }
  
  </code></pre>
  <p>I don't understand what does:</p>
  <blockquote>
  <p><em>Unlike save method executes a primitive operation without cascades, relations and other operations included.</em></p>
  <p>From <code>.insert()</code> comment</p>
  </blockquote>
  <p>means</p>