Does TransactionAttributeType.NOT_SUPPORTED make sense for retrieving entities?
问题 Does having TransactionAttributeType.NOT_SUPPORTED on every DB lookup method makes sense? I don't see the point in having the entity attached if it's not going to execute an update. @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) pubic List<AnEntity> getListEntities(){ TypedQuery<AnEntity> query = em.createNamedQuery("AnEntity.myQuery",AnEntity.class); return query.getResultList(); } Does it still end up in the cache? The only time it seems useful to use the REQUIRED transcation