Closed
Description
Tested with sqlite driver only:
@Table()
export class MyRecord {
@PrimaryColumn() key: string;
@Column(CT.DATETIME, { nullable: true }) mtime: Date;
}
var x= {key:"gg", mtime:new Date()};
persist(x)
SQL
INSERT INTO "my_record"("key", "mtime") VALUES ($1,$2) -- PARAMETERS: ["gg","2017-1-9 11:50:4"]
2017-1-9 11:50:4
seems like a wrong value for the date parameter, But also after that - when loading the objects with typeorm the value of the property is of type string and not Date.