Hibernate Criteria API 未来使用稳定吗?
我在之前的项目中主要使用 Hibernate criteria API。我发现 Hibernate criteria Expression 已被弃用!
Hibernate Criteria API 未来使用稳定吗?
http://docs.jboss.org/hibernate /core/3.3/api/org/hibernate/criterion/Expression.html
I mostly use Hibernate criteria API in my previous project. I found Hibernate criteria Expression is already deprecated!
Is Hibernate Criteria API stable for future usage?
http://docs.jboss.org/hibernate/core/3.3/api/org/hibernate/criterion/Expression.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它已被弃用,但他们提供了限制。但请确保在 Hibernate 中获取数据时在 HQL 和条件之间做出正确的选择。我喜欢 HQL,因为它简单、灵活且功能强大。 此处了解有关 hql 的更多信息。
Its deprecated but they have provided Restrictions instead. But make sure you make the proper choice between HQL and criteria when fetching data in hibernate. I like HQL because its simple, flexible and powerful. Read more about hql here.
好吧,事情确实被弃用了。如果它被标记为这样,则不要使用它。但如果没有关于弃用的注释,则它不会被弃用。只有算命师才能预测未来会发生什么。您可以尝试阅读论坛并查看是否有任何讨论,但我认为 criteria api 不会消失或发生重大变化。
Well, things do get deprecated. If it's marked as such then don't use it. But if there is no note about deprecation - it's not deprecated. Only fortune teller can tell what happens in future. You can try to read forums and see if there is any discussion but I don't think criteria api is going away or undergo signifficant change.