如何使用实体查询框架对以下查询进行建模
我们有一个查询需要检查某个整数字段点是否不为空以及约会日期是否在当前日期之前?对于上述场景,如何编写限制表达式呢?
@Entity
public class User {
...
Integer points;
Date appointmentDate;
...
}
We have a query which needs to check if a certain integer field points is not null and if appointmentDate is before current date? How do I write the restrictions expression for the above scenario?
@Entity
public class User {
...
Integer points;
Date appointmentDate;
...
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果使用 Hibernate
如果使用 JPA
If using Hibernate
If using JPA