Relative Content

Tag Archive for springhibernateorm

Hibernate detached entity merge

I have a UserEntity that has a @ManyToMany bidirectional mapping association with ConversationEntity. The issue I’m facing is when I save a detached UserEntity that has an empty conversation mapping (even though there are associated conversations in the database), I expect that the entity will be merged and the @ManyToMany mapping will be populated in the returned entity. However, the associations are not being populated in the returned entity after the merge operation.