Hello, I´m using HibernateSearch verison 6.1.6.Final and facing this reindexing exception:
org.hibernate.search.util.common.SearchException: HSEARCH700084: Exception while resolving other entities to reindex as a result of changes on entity A#1138251': null Context: path '.listOfB
in case of deletion of indexed entity A that has association to other indexed entity B like this (simplified):
@Indexed(index="index_a")
@Table(name = "table_a")
public class A {
@OneToMany(mappedBy = "a")
@EqualsAndHashCode.Exclude
private List<B> listOfB;}
@Indexed(index="index_b")
@Table(name = "table_b")
public class B {
@Column(name = "a_id")
@GenericField
private Long aId;
@ManyToOne
@JoinColumn(name = "a_id", insertable = false, updatable = false)
private A a;
}
both entities also use TypeBinder and define inverse path context dependency one to each other (simplified):
In TypeBinder for A:
context.dependencies()
.fromOtherEntity(B.class, B.Fields.a)
.use(B.Fields.someField);
In TypeBinder for B:
context.dependencies()
.fromOtherEntity(A.class,A.Fields.listOfB)
.use(A.Fields.someField);
Is there any solution to be able to delete entity A without facing the exception while in moment of deletion A is ensured that there is no associated B to A?
Thank you very much!