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
Currently I am trying to load a model which has a Sequelize.TEXT field that stores a serialized JSON blob. Doing this outside of Postgres, I need to do the serialization / parsing within the model set and get commands. Currently sequelize-fixtures loader doesn't account for these set methods which forces the system to try and sanitize an object as though it were a string, giving me this error:
Unhandled rejection TypeError: val.replace is not a function
at Object.SqlString.escape (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/sql-string.js:63:15)
at Object.QueryGenerator.escape (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:977:22)
at Object.QueryGenerator.whereItemQuery (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2260:22)
at /Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1891:25
at /Volumes/pocketship/pocketship/node_modules/sequelize/node_modules/lodash/lodash.js:4389:15
at baseForOwn (/Volumes/pocketship/pocketship/node_modules/sequelize/node_modules/lodash/lodash.js:2652:24)
at Function.forOwn (/Volumes/pocketship/pocketship/node_modules/sequelize/node_modules/lodash/lodash.js:12254:24)
at Object.QueryGenerator.whereItemsQuery (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1890:9)
at Object.QueryGenerator.getWhereConditions (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2325:19)
at Object.QueryGenerator.selectQuery (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1451:28)
at [object Object].QueryInterface.select (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/query-interface.js:669:25)
at [object Object].<anonymous> (/Volumes/pocketship/pocketship/node_modules/sequelize/lib/model.js:1390:32)
at [object Object].tryCatcher (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Volumes/pocketship/pocketship/node_modules/bluebird/js/release/async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
My model definition has been simplified to build a reproducible case:
Currently I am trying to load a model which has a Sequelize.TEXT field that stores a serialized JSON blob. Doing this outside of Postgres, I need to do the serialization / parsing within the model
set
andget
commands. Currently sequelize-fixtures loader doesn't account for these set methods which forces the system to try and sanitize an object as though it were a string, giving me this error:My model definition has been simplified to build a reproducible case:
And the loaded fixture is the following:
The text was updated successfully, but these errors were encountered: