I have table 'customers'
and table 'conversations'
I am pretty new in javascript. Currently, I try to use knex + bookshelf (SQL server database with tedious driver) to join those two tables. I separate those two tables in two models and call it from a router (I use Node js).
conversation.js
customer: function() { return this.belongsTo('Customer','uniqueid'); }
customer.js
conversation: function(){ return this.hasMany('Conversation','customer_id'); }
When I try to join the tables as
Customer.fetchAll({withRelated:['conversation'], debug: true}).then(function(data{
console.log('data : '+data);
});
Unfortunately, I always get the error:
Unhandled rejection RequestError: The conversion of the nvarchar value '238998679919674' overflowed an int column.
I curious about where is the error come from? since the columns' type is nvarchar, not int.
via Akmal
No comments:
Post a Comment