bookshelf-json-columns icon indicating copy to clipboard operation
bookshelf-json-columns copied to clipboard

Doesn't work.... stringify not called on create

Open brandoncollins7 opened this issue 7 years ago • 1 comments
trafficstars

I have tagged my json column but when I save a new record, the stringify code does not get executed and my object is persisted as [object object]. What is supposed to be calling stringify?

When the same method of this library is called it returns at:

// Only handle arguments withpatchoption. if (!options.patch) { return Model.save.apply(this, arguments); } https://github.com/seegno/bookshelf-json-columns/blob/master/dist/index.js#L100

and stringify is never called. Seems to call parse ok when I am fetching, but no stringify when I am creating.

brandoncollins7 avatar Mar 19 '18 18:03 brandoncollins7

I'll admit, I hacked it to support mssql.... are the other db libraries responsible for normally calling stringify?

brandoncollins7 avatar Mar 19 '18 19:03 brandoncollins7