Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试通过使用休眠事件侦听器(PostUpdateEventListener、PostInsertEventListener 等)来跟踪我的父实体。当对关联实体进行更改的父实体发生更新时,hibernate 返回关联实体而不是父实体。当对关联实体进行更改时,是否有办法找到/了解父实体?谢谢
您可能需要添加从子到父的关系才能遍历。
<many-to-one name="parent" inverse="true"> </many-to-one>