Skip to main content
3 of 5
deleted 163 characters in body
Stephen Paul
  • 39.4k
  • 18
  • 99
  • 76

I just got this error because I was setting an un-managed, un-proxied bean.

I should have been linking a proxied entity instance.

See the below explanation:

Child saved = childRepository.save(child); // INCORRECT parent.setChild(child); // <-- 'child' is NOT managed (not proxied) // CORRECT parent.setChild(saved); // <-- 'saved' is managed (proxied) 
Stephen Paul
  • 39.4k
  • 18
  • 99
  • 76