Fix RegistryJpaIO.Read problem with large data (#1161)

* Fix RegistryJpaIO.Read problem with large data

The read connector needs to detach loaded entities. This 
is now the default behavior in QueryComposer

Also removed the 'transaction mode' property from the Read connector.
There are no obvious use cases for non-transaction query, and
implementation is not straightforward with the current code base.

Also changed the return type of QueryComposer.list() to ImmutableList.
This commit is contained in:
Weimin Yu
2021-05-14 15:19:12 -04:00
committed by GitHub
parent 238deb25ec
commit e09138645f
7 changed files with 46 additions and 32 deletions
@@ -83,7 +83,7 @@ public class RegistryJpaReadTest {
}
@Test
void nonTransactionalQuery() {
void jpaRead() {
Read<ContactResource, String> read =
RegistryJpaIO.read(
(JpaTransactionManager jpaTm) -> jpaTm.createQueryComposer(ContactResource.class),