Skip to content

Commit

Permalink
revert fix for #1089
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed May 18, 2019
1 parent a50fd8c commit e27e6ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
7 changes: 1 addition & 6 deletions lib/queryBuilder/operations/UpdateOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ class UpdateOperation extends QueryBuilderOperation {
// "col" : raw(`jsonb_set("col", '{attr}', to_jsonb("other"#>'{lol}'), true)`)

let parsed = ref(key);
let jsonRefs =
'{' +
parsed.parsedExpr.access
.map(it => modelClass.columnNameToPropertyName(it.ref))
.join(',') +
'}';
let jsonRefs = '{' + parsed.parsedExpr.access.map(it => it.ref).join(',') + '}';
let valuePlaceholder = '?';

if (isKnexQueryBuilder(val) || isKnexRaw(val)) {
Expand Down
14 changes: 0 additions & 14 deletions test/package.json

This file was deleted.

3 changes: 2 additions & 1 deletion tests/integration/snakeCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ module.exports = session => {
});

if (session.isPostgres()) {
it('update with json references', () => {
// TODO: Enable and fix after -> is used as a separator.
it.skip('update with json references', () => {
return Person.query(session.knex)
.where('first_name', 'Matti')
.patch({
Expand Down

0 comments on commit e27e6ec

Please sign in to comment.