-
Notifications
You must be signed in to change notification settings - Fork 35
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
No Persistence provider for EntityManager named #291
Comments
Thanks for submitting this issue, I'll be looking into it. What about if you pass the factory to JPAStreamer directly?
|
@julgus there is no such a method in JPAStreamer |
|
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
....
JPAStreamer jpaStreamer = JPAStreamer.of(factory);
|
Oh, I see, the |
I have created a separate issue for JPA 3 support here: #299. |
I'm using persistence version="2.2" |
I think that you should have quick start with full dependency tree , or working example in github |
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.15.Final</version>
</dependency>
<dependency>
<groupId>com.speedment.jpastreamer</groupId>
<artifactId>jpastreamer-core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.32</version>
</dependency>
JPAStreamer jpaStreamer = JPAStreamer.of(PERSISTENCE_UNIT_NAME);
jpaStreamer.stream(AaiUser.class)
.forEach(System.out::println);
|
Have you seen https://github.com/speedment/jpa-streamer-demo? |
Sorry for taking so long to respond. I have been able to reproduce this issue and conclude that this is due to how Hibernate handles the fetching of the list of reservations associated with your One workaround is to limit the printed fields to fields that are available in the original
If the reservations are important, make sure to join in the reservations in the stream query:
This ensures that Hibernate will fetch all the relevant information in a single |
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.2.5.Final</version>
</dependency>
<dependency>
<groupId>com.speedment.jpastreamer</groupId>
<artifactId>jpastreamer-core</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.33</version>
</dependency>
|
Regrettably, as outlined in the description, this issue stems from Hibernate's behavior of closing the initial resultset when a second one is opened. To address this, I would recommend that you incorporate a join operation to consolidate information from other tables. This approach guarantees that all pertinent data is retrieved within a single resultset. Given this context, I will proceed to close this issue, as I don't consider it to be a bug within JPAStreamer. If you have further questions or encounter related concerns, please don't hesitate to reopen the issue or reach out for additional assistance. |
The text was updated successfully, but these errors were encountered: