You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error happens when creating a connection and saving/synchronizing the new schema. The error given is:
TypeError: Cannot read property 'type' of undefined
at PostgresQueryRunner.<anonymous> (C:\Users\Robbie\Code\project\node_modules\typeorm\driver\postgres\PostgresQueryRunner.js:2062:109)
at step (C:\Users\Robbie\Code\project\node_modules\tslib\tslib.js:136:27)
The actual location of this error in the uncompiled TS code is here. This error has been reported before in #5747 but that issue blames the problem on changes in recent versions. I have this problem in a few different versions of typeorm, 0.2.24 (latest) and 0.2.22 and 0.2.15, so it doesn't seem to be something new.
The text was updated successfully, but these errors were encountered:
Just made a bug repro for this and.. the bug isn't there! It it most likely an issue with my code somehow, although TypeORM is involved. I'll close this issue for now.
I figured out what was happening. The problem happens when you try to make an array of geolocations, and I hadn't synchronized the database so the above code doesn't reproduce the error, but this repository should. To reproduce:
Clone repository
Set your DATABASE_URL environment variable to a postgres database url.
Run npm start once to set up the database tables.
Run it again and it will throw an error when trying to diff the database.
RobbieGM
changed the title
Spatial columns cause error in PostgresQueryRunner on synchronize
Geometry array column causes error in PostgresQueryRunner when synchronizing
May 8, 2020
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[x]
0.2.24
(latest) and0.2.22
and0.2.15
Steps to reproduce or a small repository showing the problem:
Create a model with a spatial column in a postgres database. For example:
The error happens when creating a connection and saving/synchronizing the new schema. The error given is:
The actual location of this error in the uncompiled TS code is here. This error has been reported before in #5747 but that issue blames the problem on changes in recent versions. I have this problem in a few different versions of typeorm,
0.2.24
(latest) and0.2.22
and0.2.15
, so it doesn't seem to be something new.The text was updated successfully, but these errors were encountered: