You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After Creating Model and using create() method to store data , but as soon as i execute save() method it is not going inside save method , I don't know what is an issue.
var model = require('model');
var Listing = function(){
this.defineProperties({
name: { type: 'string', required: true },
age : {type:'number',required : true}
});
this.setAdapter('postgres', {
host: 'xxx.xxx.xx.xx',
username: 'postgres',
password: 'xxxxxxx',
database: 'xxxxxxx'
});
//Connection Status : Success
};
Listing = model.register('Listing',Listing);
var list = Listing.create({
name : 'xyz',
age : 20
});
list.save(function (err, data) {
if (err) {
throw err;
}
console.log('New item saved!');
});
The text was updated successfully, but these errors were encountered:
After Creating Model and using create() method to store data , but as soon as i execute save() method it is not going inside save method , I don't know what is an issue.
The text was updated successfully, but these errors were encountered: