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

智能判断字段值为空的时候生成is null语句 #101

Closed
sjbwylbs opened this issue Nov 4, 2011 · 0 comments
Closed

智能判断字段值为空的时候生成is null语句 #101

sjbwylbs opened this issue Nov 4, 2011 · 0 comments
Labels
Milestone

Comments

@sjbwylbs
Copy link
Member

sjbwylbs commented Nov 4, 2011

案例如下:
where menu0_.cat_id=? and menu0_.parent_id=? and menu0_.enable=?
如果我的menu0_.parent_id=? 这个id的值为null
因为不是自己写sql,自己写的时候会写menu0_.parent_id is null这样才能查询出符合语句的数据来,
问现在的Nutz.dao有没处理值为空的时候生成的查询sql就是 menu0_.parent_id is null呢

cri.where().andEquals("abc", null); 就会错
需要在andEquals 中添加判断字段值为空的时候生成is null语句

zozoh added a commit that referenced this issue Nov 4, 2011
@zozoh zozoh closed this as completed Nov 4, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants