DataTypeNotSupportedError: Data type "Object" is not supported by "postgres" database

See original GitHub issue

Issue 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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
darkbasiccommented, Apr 16, 2018

I didn’t change anything else, I only updated typeorm.

Also the following works flawlessly:

@Column({type: "time without time zone", nullable: true})
receivedAt: Date;

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.

0reactions
darkbasiccommented, Apr 17, 2018

ts-node 6 has been released, changing the default behaviour to type check by default, making it compatible with typeorm.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found