Closed julgus closed 1 year ago
JPAStreamer should be compatible with Hibernate + Panache applications.
To facilitate this we should allow JPAStreamer to be configured with a Supplier<EntityManagers> that can be provided by any PanacheEntityBase. E.g.
Supplier<EntityManagers>
PanacheEntityBase
@ApplicationScoped public class FilmRepository implements PanacheRepository<Film> { private final JPAStreamer jpaStreamer = JPAStreamer.of(this::getEntityManager); public Stream<Film> films() { return jpaStreamer.stream(Film.class).limit(10); } }
I separated the original issue into two parts to reflect the fact that this will be a two-stage rocket. See, #283.
JPAStreamer should be compatible with Hibernate + Panache applications.
To facilitate this we should allow JPAStreamer to be configured with a
Supplier<EntityManagers>
that can be provided by anyPanacheEntityBase
. E.g.