5.0.1 BUG需求收集 返回
SqlSugar
老数据
12
1908

悬赏:5 飞吻
禁止水贴 ,把你们的需求和BUG写在这个贴子下面
热忱回答(12)
-
一丶点 VIP0
2020/10/26Insert时如果为null 插入时根据数据库的默认约束来,因为数据库会有约束 not null 加 default
0 回复 -
一丶点 VIP0
2020/10/26简单的in 查询 sql 像这样
select * from table where state in(1,2)
0 回复 -
fate stay night VIP0
2020/10/26@一丶点:insertable null 限制有个别数据库还没有兼容,下个版本处理
in这样的查询是支持的 可以文档搜索 in(
0 回复 -
fate stay night VIP0
2020/10/26int
[] allIds=
new
int
[]{1,2,3};
db.Queryable<OrderItem>().Where(it => allIds.Contains(it.OrderId)).ToList()
0 回复 -
一丶点 VIP0
2020/10/26@fate stay night:非常感谢
0 回复 -
Chris VIP0
2020/10/28导航属性会发生多次查询,如果要一次查询出来,只能用连接查询?
0 回复 -
fate stay night VIP0
2020/10/28@Chris:目前mapper是最佳查询性能,比连表更快,只会生成2句sql
0 回复 -
fate stay night VIP0
2020/10/28@Chris:联表怎么查询要group那样性能更差
0 回复 -
Chris VIP0
2020/10/30@fate stay night:mapper能够查询指定的部分字段吗,我再select中指定的具体字段的话会报错,如果导航属性有n个属性需要导航,就需要查询n+1次对吧?
0 回复 -
fate stay night VIP0
2020/10/30@Chris:其实你要指定字段或许join更适合你的需求
0 回复 -
fate stay night VIP0
2020/10/30或者用手写mapper的方式去实现
0 回复 -
Chris VIP0
2020/10/30好的,了解
0 回复