# Hibernate flushToIndex failing after multiple entity index

**URL:** https://discourse.hibernate.org/t/hibernate-flushtoindex-failing-after-multiple-entity-index/4459
**Category:** Hibernate ORM
**Created:** [August 5, 2020, 10:20am UTC](https://discourse.hibernate.org/t/hibernate-flushtoindex-failing-after-multiple-entity-index/4459 "2020-08-05T10:20:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shrinivasva](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@shrinivasva](https://discourse.hibernate.org/u/shrinivasva)
#### Post date: [August 5, 2020, 10:20am UTC](https://discourse.hibernate.org/t/hibernate-flushtoindex-failing-after-multiple-entity-index/4459/1 "2020-08-05T10:20:30Z")

</div>

in of service we are triggering :  
fullTextEntityManager.index(person); and it’s dependency entity index as below  
for (Case personCase : personCases) {  
LOGGER.info(“Indexing case {}”, personCase.getId());  
fullTextEntityManager.index(personCase);  
}  
then in end we are  
fullTextEntityManager.flushToIndexes();

It was working till with Hibernate Search 5.3.0 Final, but after upgrading 5.8.0 Final it is failing with below error :  
org.hibernate.HibernateException: Found shared references to a collection: com.core.db.entity.HistoryTask.translations

the particular translation table mapped as below :  
@OneToMany  
@JoinColumn(name="`key`", referencedColumnName=“task\_outcome”, insertable=false, updatable=false)  
@JsonIgnore  
@XmlTransient  
private Set translations;  
So please help me out , how to prevent issue “Found shared references to a collection”
