Closed netonrails closed 6 years ago
Hi @netonrails
sorry for the delay!
What database do you use? Are there any validation errors (console.log(model.errors)
)?
If there is some autoincrement value defined in the database openrecord will not take any input for that field.
Some of my tables use 'bar_code' instead of 'id' for primary key name. and varchar type.
This case,
.. model.bar_code = req.body.bar_code; //--- user input value but "0" ..
model.save(function() { model.bar_code === "0" //--- true!!! }
How can I avoid this problem?