I want to check if entity is in a Collection member (@OneToMany or @ManyToMany) of another entity:
@OneToMany
@ManyToMany
if (entity2.getEntities1().conta
That's the only way. You may want to try Pojomatic library which does the hard job for you.