Is there any way to explicitly add type casts on sequelize when defining association? The Transaction Details table and Products table have 1:M association and they are defined like this:
db.models.TransactionDetails.hasMany(db.models.Products,{
sourceKey: 'productId', //this has a data type of character varying
foreignKey: 'recordId' // this is bigint
});
I am getting the error "SequelizeDatabaseError: No operator matches the given name and argument types. You might need to add explicit type casts." when I'm doing include because they have different data types. Altering the table on postgres won't be a solution because this is only on localhost.