Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow JPAStreamer to be configured with a Supplier of EntityManagers #279

Closed
julgus opened this issue Nov 3, 2022 · 1 comment
Closed
Assignees
Projects
Milestone

Comments

@julgus
Copy link
Member

julgus commented Nov 3, 2022

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.

@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); 
    }

}
@julgus julgus self-assigned this Nov 3, 2022
@julgus julgus added this to To do in 1.1.4 via automation Nov 3, 2022
@julgus julgus added this to the 1.1.1 milestone Nov 3, 2022
@julgus julgus changed the title Make JPAStreamer compatible with Panache + Hibernate Allow JPAStreamer to be configured with a Supplier of EntityManagers Dec 2, 2022
@julgus julgus moved this from To do to Done in 1.1.4 Dec 2, 2022
@julgus
Copy link
Member Author

julgus commented Dec 2, 2022

I separated the original issue into two parts to reflect the fact that this will be a two-stage rocket. See, #283.

@julgus julgus closed this as completed Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1.1.4
  
Done
Development

No branches or pull requests

1 participant