org.hibernate.TransientObjectException: object references an unsaved transient instance ![]() |
SolutionEither use session.save for both objects or specify a cascade="save-update,persist" in your mapping.Exception MessageException in thread "main" org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: de.laliluna.cascade1.Dog
|
object references an unsaved transient instance - save the transient instance before flushing
最新推荐文章于 2024-04-02 15:52:59 发布
本文介绍了解决Hibernate框架中出现的TransientObjectException异常的方法。该异常通常发生在尝试引用未保存的对象实例时。解决方案包括在会话中保存所有相关对象或在映射文件中指定级联操作。

770

被折叠的 条评论
为什么被折叠?



