cyjake / leoric

👑 JavaScript ORM for MySQL, PostgreSQL, and SQLite.

Home Page:https://leoric.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] upsert attributes should use defaultValue while there is no value assigned

JimmyDaddy opened this issue · comments

class User {
  id: number;
  email: string;
  nickname: string;
  status: {
     type: number,
     defaultValue: 1
  };
}

// INSERT INTO `users` ( `email`, `nickname`, `status`) VALUES('sss', 'hello', 1) ****
User.upsert({ email: 'sss', nickname: 'hello' });