We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node version: 0.10.25 orm version: 2.1.13 mysql version: 2.3.0
Reproduce of the bug:
Create a model that has a key with mapsTo enable, e.g.
var Model = db.define('model', { name: String, remapKey: { type: "text", mapsTo: "remap_key" } });;
Later, when save an item that is gotten from Model.get(),
Model.get()
modelObject.remapKey = "another value"; modelObject.save(function (err) { if (err) throw err; cb(); }
it will throw an error on mysql level, error message as follow
ER_BAD_FIELD_ERROR: Unknown column 'remapKey' in 'field list'
First quick investigation suggests bugs on function savePersisted() on Instance.js with line 246, which
function savePersisted()
Instance.js
data[opts.changes[i]]
will return an undefined value
Could you please help on fixing this?
The text was updated successfully, but these errors were encountered:
1cd44d8
It seems the implementation of mapsTo was very broken (missing in most cases). I've fixed it & written better tests. Please try v2.1.14.
mapsTo
Sorry, something went wrong.
Thanks, the problem also happens on any instance returned by find()
find()
The one on get() is fixed
get()
No branches or pull requests
Node version: 0.10.25
orm version: 2.1.13
mysql version: 2.3.0
Reproduce of the bug:
Create a model that has a key with mapsTo enable, e.g.
Later, when save an item that is gotten from
Model.get()
,it will throw an error on mysql level, error message as follow
First quick investigation suggests bugs on
function savePersisted()
onInstance.js
with line 246, whichwill return an undefined value
Could you please help on fixing this?
The text was updated successfully, but these errors were encountered: