Часами искал решение этой проблемы и абсолютно ничего не нашел, так что теперь, когда у меня есть решение, я опубликую это здесь, чтобы другим не пришлось go испытывать такую же боль.
Следующая трассировка стека была вызвана, когда я добавил отображение @OneToOne в новую сущность. В чем причина?
2020-03-17 22:10:26.091 ERROR 46765 --- [ XNIO-12 task-9] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.HibernateException: could not reassociate uninitialized transient collection]
2020-03-17 22:10:26.092 ERROR 46765 --- [ XNIO-12 task-9] my.app.aop.logging.LoggingAspect : Exception in ch.hockai.web.rest.MyEntityResource.updateMyEntity() with cause = 'org.hibernate.HibernateException: could not reassociate uninitialized transient collection' and exception = 'could not reassociate uninitialized transient collection; nested exception is org.hibernate.HibernateException: could not reassociate uninitialized transient collection'
org.springframework.orm.jpa.JpaSystemException: could not reassociate uninitialized transient collection; nested exception is org.hibernate.HibernateException: could not reassociate uninitialized transient collection
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:351)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:253)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:536)
<snip/>
Caused by: org.hibernate.HibernateException: could not reassociate uninitialized transient collection
at org.hibernate.event.internal.ProxyVisitor.reattachCollection(ProxyVisitor.java:75)
at org.hibernate.event.internal.WrapVisitor.processCollection(WrapVisitor.java:70)
at org.hibernate.event.internal.AbstractVisitor.processValue(AbstractVisitor.java:104)
<snip/>