TransientObjectException - object references an unsaved transient instance - save the transient instance before flushing

前端 未结 2 426
北海茫月
北海茫月 2021-02-12 13:00

I\'ve come across a few good possible answers to my questions, but this is regarding an upgrade from Hibernate 3.4.0GA to Hibernate 4.1.8. So this used to work under the previou

2条回答
  •  借酒劲吻你
    2021-02-12 13:03

    NoteItem references a transient (not yet saved) instance of Note which has to be saved before. So specify "Cascade.all" on property note or call saveorupdate on Note first.

提交回复
热议问题