gpt4 book ai didi

hibernate - PropertyAccessor 和 PropertyAccessorFactory 是否已删除或弃用?

转载 作者:行者123 更新时间:2023-12-02 08:24:56 25 4
gpt4 key购买 nike

在issue 29980421中,我发现答案中的代码示例包括PropertyAccessor和PropertyAccessorFactory。查看hibernate-orm项目时,发现删除了这些类:

org.hibernate.property.PropertyAccessor 于 2015-06-04 15:12:17 GMT-04:00 被删除org.hibernate.property.PropertyAccessorFactory 已于 2015-06-04 15:12:17 GMT-04:00 删除

有人会对此提供任何反馈吗?

如果可能的话,你能不能提供一个运行的例子,替换In issue 29980421第一个答案中的代码例子? How to retrieve a set of member objects using Hibernate?

编辑:

感谢您的评论。阅读评论后,我从问题中删除了 hibernate 4.x。 PropertyAccessorFactory 怎么样?

最佳答案

也许为时已晚,但现在您必须选择 PropertyAccessStrategy 实现之一,例如 PropertyAccessStrategyFieldImpl。

    PropertyAccessStrategy accessor = PropertyAccessStrategyFieldImpl.INSTANCE;
PropertyAccess access = accessor.buildPropertyAccess(entityClass, "propertyName");

关于hibernate - PropertyAccessor 和 PropertyAccessorFactory 是否已删除或弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33100243/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com