Skip to content

Commit 29f46bc

Browse files
committed
fix(GH-273): add detach entity in result list stream
1 parent 37f1416 commit 29f46bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphql-jpa-query-schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaQueryFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ protected <T> Stream<T> getResultStream(TypedQuery<T> query,
262262

263263
// Let's execute query and get wrap result into stream
264264
return query.getResultList()
265-
.stream();
265+
.stream()
266+
.peek(entityManager::detach);
266267
}
267268

268269
protected Object querySingleResult(final DataFetchingEnvironment environment) {

0 commit comments

Comments
 (0)