When saving a column that has the integer array type using TypeORM, the values are converted to strings in the resulting SQL statement.
TypeError: Cannot read properties of null (reading 'map')
at PostgresQueryRunner.query (src/driver/postgres/PostgresQueryRunner.ts:299:19)
at InsertQueryBuilder.execute (src/query-builder/InsertQueryBuilder.ts:163:33)
at SubjectExecutor.executeInsertOperations (src/persistence/SubjectExecutor.ts:434:42)
at SubjectExecutor.execute (src/persistence/SubjectExecutor.ts:137:9)
at EntityPersistExecutor.execute (src/persistence/EntityPersistExecutor.ts:182:21)
Describe the bug
When saving a column that has the integer array type using TypeORM, the values are converted to strings in the resulting SQL statement.
To Reproduce
Entity
Expected:
INSERT INTO "product"("channels") VALUES (ARRAY([501]))
ActualINSERT INTO "product"("channels") VALUES (ARRAY(['501']))
pg-mem version
2.6.12