code: private void evictBiDiReferencedEntities(Entity entity) {
      Stream<EntityKey> backreffingEntities =
          getEntityType()
              .getMappedByAttributes()
              .flatMap(mappedByAttr -> Streams.stream(entity.getEntities(mappedByAttr.getName())))
              .map(EntityKey::create);
      Stream<EntityKey> manyToOneEntities =
          getEntityType()
              .getInversedByAttributes()
              .map(inversedByAttr -> entity.getEntity(inversedByAttr.getName()))
              .filter(Objects::nonNull)
              .map(EntityKey::create);
  
      l1Cache.evict(Stream.concat(backreffingEntities, manyToOneEntities));
    }
docs: Evict all entity instances referenced by this entity instance through a bidirectional relation.
  
  @param entity the entity whose references need to be evicted