I am facing this error in my entity class.
Found shared references to a collection:
com.model.Parts.employees
Below is my code in the Parts model class
@OneToMany
@JoinColumn(name="COMPASS_SKU", referencedColumnName="MANUF_PART_NUM")
private Set<Employee> employees;
How can I get rid of this error?
The stack trace:
ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff87a50a79:-7b13082e:5429d17a:27, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@10da269
: javax.persistence.PersistenceException: org.hibernate.HibernateException: Found shared references to a collection: com.model.Parts.employees at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) [hibernate-entitymanager-4.2.0.Final-redha