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

数据库字段名是中文时,where报错:INVALID_WHERE_CONDITION_KEY #1501

Open
Master-13 opened this issue Jul 15, 2020 · 1 comment

Comments

@Master-13
Copy link

DESC

访问数据库时,使用Model.thenUpdate方法,第二个参数是where,但数据库列名是中文的,如:{姓名:'张守恒'},报错为INVALID_WHERE_CONDITION_KEY

ENV

OS Platform: Cent OS7 mysql

Node.js Version: 14+

ThinkJS Version: 3

code

// your code here

error message

INVALID_WHERE_CONDITION_KEY

// your error message here

more description

// your detail description

@lizheming
Copy link
Contributor

https://github.com/thinkjs/think-model-abstract/blob/master/lib/parser.js#L176 因为安全问题我们做了 key 的校验,目前是限定了英文数字…暂时不支持中文的

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

2 participants