Kononnable / typeorm-model-generator

Generates models for TypeORM from existing database.
MIT License
1.51k stars 281 forks source link

bigint generate to string,how to generate to number #333

Closed bulolo closed 3 years ago

bulolo commented 3 years ago
  @PrimaryGeneratedColumn({ type: "bigint", name: "id", comment: "id" })
  id: string;
Kononnable commented 3 years ago

Generating number would not be a correct behavior here. Sql Bigint type support larger numbers then JS Number type. If you use JS Number type you can loose your data without noticing it(no overflow errors).