- I have entity Patient and entity Test.
- Both have ManyToMany relationships each other.
- I added CASCADE_TYPE=ALL at both sides.
- I am using Hibernate EntityManager's persist(Patient); method.
- When i execute it it is throwing "org.hibernate.PersistentObjectException: detached entity passed to persist: Test"
- These are the screens.
The Patient class
The Test class
If anyone have solution please share it.
Thanks.