| SQL直実行 | dataSource.query() | 配列が戻り値 | 
| カウント | dataSource.getRepository(Trips).count({ where: { carId: carId } }) | 条件付けないならcount() | 
| where条件直記載 | dataSource.getRepository(PosRecords).count({where: {recorded: Raw((alias) => `${alias} between :from AND :to`,{from: '2022-10-1', to: '2022-11-1'})}}); | toとfromをパラメータ化 | 
https://zenn.dev/msksgm/articles/20211124-typeorm-many2many
自然に任せると勝手にテーブル推定してわけわからんので指定すること!StoreテーブルのPrefectureがこれ!
 @ManyToMany(() => Prefecture)
 @JoinTable({
     name: "store_prefecture", // table name for the junction table of this relation
     joinColumn: {
         name: "store_id",
         referencedColumnName: "id"
     },
     inverseJoinColumn: {
         name: "prefecture_id",
         referencedColumnName: "id"
     }
 })
create table test (`created` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
create table test (`created` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
 @UpdateDateColumn({ name: 'modified', type: 'datetime', width: 6, precision: 0})