DataTypeNotSupportedError: Data type "Object" is not supported by "postgres" database
See original GitHub issueIssue type:
[ ] question [x] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] sqlite
[ ] sqljs
[ ] websql
TypeORM version:
[ ] latest
[x] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
@Column({nullable: true})
receivedAt: Date;
The previous code used to work, after upgrading to latest @next snapshot now I get the following error:
(node:2899) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): DataTypeNotSupportedError: Data type "Object" in "Recipient.receivedAt" is not supported by "postgres" database.
How am I supposed to specify a generic date type which will work with most dbs?
@CreateDateColumn is not an option because it will have to be initialized with a null value and updated with a date later on.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
typeORM: "message": "Data type \"Object\" in \"..." is not ...
name: 'DataTypeNotSupportedError', message: 'Data type "Object" in "User.name" is not supported by "postgres" database.' } When looking at the ...
Read more >typeorm/typeorm - Gitter
DataTypeNotSupportedError : Data type "Object" in "Member.birthday" is not supported by "mysql" database. A workaround I found is to set ...
Read more >Data type "Object" is not supported by "postgres" database
DataTypeNotSupportedError : Data type "Object" is not supported by "postgres" database.
Read more >[ postgres ] DataTypeNotSupportedError: Data type "Object" in ...
[ postgres ] DataTypeNotSupportedError: Data type "Object" in "~" is not supported by "postgres" database. 수구리 2021. 12. 2. 21:37.
Read more >[TypeScript][PostgreSQL]Try TypeORM - DEV Community
DataTypeNotSupportedError : Data type "Object" in "ExecutionItem.errorMessage" is not supported by "postgres" database. at new ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I didn’t change anything else, I only updated typeorm.
Also the following works flawlessly:
To reproduce the issue you can simply run npm start from this repo: https://github.com/Urigo/whatsapp-server-express
If you want me to create something more minimal just let me know, but should be good to reproduce the issue.
ts-node 6 has been released, changing the default behaviour to type check by default, making it compatible with typeorm.