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
Originally reported in balderdashy/waterline#698: when executing .update() if the record contains an array, this array becomes a string in the afterUpdate values.
As you can tell from the model definition below, the groups field is an array. I have checked to ensure that i'm passing it an array when its going in, and reading it back out of the database the value is an array, but the value passed to the afterUpdate is a string
I can probably fix this and issue a PR, but i was wondering where I should start looking for the issue... would the code responsible for serializing arrays to string and back be in waterline or sails-mysql?
Thanks for posting, @dmarcelino. I'm a repo bot-- nice to meet you!
It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
review our contribution guide to make sure this submission meets our criteria (only verified bugs with documented features, please; no questions, commentary, or bug reports about undocumented features or unofficial plugins)
create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to the original issue. This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.
Following up on this, I can reproduce using @dmarcelino's test in waterline-adapter-tests, but I can't reproduce it just using a regular Sails app and models in Sails v0.12.x/Waterline v0.11.x/sails-mysql v0.11.x, which is puzzling. With Sails 1.0 and the relevant adapter it seems to work fine. Going to migrate this issue over.
From @dmarcelino on May 16, 2015 12:30
Originally reported in balderdashy/waterline#698: when executing
.update()
if the record contains an array, this array becomes a string in theafterUpdate
values.A failing test has been added in balderdashy/waterline-adapter-tests#73 and only sails-mysql breaks it, build results in https://travis-ci.org/balderdashy/waterline-adapter-tests/jobs/62815681#L556
Original issue balderdashy/waterline#698 reported by @chadxz:
Copied from original issue: balderdashy/sails-mysql#219
The text was updated successfully, but these errors were encountered: