I have the following model
interface UserSalary
extends Model<InferAttributes<UserSalary>, InferCreationAttributes<UserSalary>> {
user_id: number;
salary_id: number;
}
const UserSalary= webSide?.define<UserSalary>(
"user_salary",
{
user_id: DataTypes.INTEGER,
s_id: DataTypes.INTEGER
},
{ tableName: "user_salary", timestamps: false }
);
export default UserSalary;
and i have
let userSalaryList= [{ user_id: 1 ,salary_id: 1},{ user_id: 2 ,salary_id:4},{ user_id: 3 ,salary_id: 6}]
i want to use bulkCreate to push userSalaryList :
await UserRole?.bulkCreate(userSalaryList, {
transaction: transaction
});
but i get the following error
original: error: Column "id" of relation "user_role" does not exist
i dont have id in the database tabel
can someone helpe me