Anylogic Java queryDSL错误的结果和()
我在任何logic模型中都有数据库 c2d_selfpickup
:
//i.sstatic.net/lczp5.png“ alt =”输入图像描述这里“>
我必须通过 scid
和 pvzid
使用querydsl:
List <Double> c2dlmList = selectFrom(c2d_selfpickup)
.where(c2d_selfpickup.sc_id.goe(SCid)
.and( c2d_selfpickup.pvz_id.goe(PVZid) ))
.list(c2d_selfpickup.c2d_lm);
如果我选择下一个对:
int SCid = 256151;
int PVZid = 547307;
我希望查询返回 c2dlmlist
带有一个值 8.0
(行号8),但它返回7个值:
[2.0, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0]
我做错了什么?
多谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
结果实际上是正确的。查询考虑数据库中的所有条目,因此它将返回所有行,其中
sc_id&gt; = 256,151
andpvz_id&gt; = 547,307
(goe = goe =更大或相等)。如果您只想获得与这两个条件完全匹配的行,则可能需要使用
eq()
而不是goe()
。The result is actually correct. The query considers all entries in the database, so it will return all rows where
sc_id >= 256,151
andpvz_id >= 547,307
(goe = greater or equal).In case you only want to get the row that exactly matches both conditions, you may want to use
eq()
instead ofgoe()
.