Skip to content
New issue

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

这里为啥跳过了 #37

Open
shepherdwind opened this issue Sep 1, 2017 · 1 comment
Open

这里为啥跳过了 #37

shepherdwind opened this issue Sep 1, 2017 · 1 comment

Comments

@shepherdwind
Copy link

ali-rds/lib/operator.js

Lines 163 to 166 in 004713c

if (column in options.where) {
continue;
}
sets.push('?? = ?');

比如

update({ is_read: 1, gmt_modified: 'now()' }, {
  where: { is_read: 0, user_id: 'xxx' },
});

这种情况 转换的 sql 会是

update xxx set gmt_modified = now() where is_read = 0 and user_id = 'xxx'

预期应该是

update xxx set gmt_modified = now(), is_read = 1 where is_read = 0 and user_id = 'xxx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant