protected <T> TypedQuery<T> detachTypedQueryNonTxInvocation(EntityManager underlyingEntityManager, TypedQuery<T> underLyingQuery) { if (!this.isExtendedPersistenceContext() && !this.isInTx()) { return new TypedQueryNonTxInvocationDetacher<>(underlyingEntityManager, underLyingQuery); } return underLyingQuery; }
protected <T> TypedQuery<T> detachTypedQueryNonTxInvocation(EntityManager underlyingEntityManager, TypedQuery<T> underLyingQuery) { if (!this.isExtendedPersistenceContext() && !this.isInTx()) { return new TypedQueryNonTxInvocationDetacher<>(underlyingEntityManager, underLyingQuery); } return underLyingQuery; }