Sequelize Unknown column '*.createdAt' in 'field list'

前端 未结 6 1894
说谎
说谎 2020-12-12 15:32

I\'m getting a Unknown column \'userDetails.createdAt\' in \'field list\' When trying to fetch with association.

Using findAll without association works

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 16:15

    For postgresql:

    const sequelize = new Sequelize('postgres://user:pass@url:port/dbname',{ 
        define:{
            timestamps: false
        }
    })
    

    Needless to say, replace user,pass,url,port and dbname values with your configuration values.

提交回复
热议问题