Announcement Announcement Module
No announcement yet.
Spring-Data-JPA and extended PersistenceContext Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring-Data-JPA and extended PersistenceContext

    SimpleJpaRepository is annotated with @Transaction(readOnly = true).

    This means that every method declared on the interface is transactional. It simply makes spring-data-jpa unusable with the extended PersistenceContext, since even in query methods you have a transaction that flushes the PersistenceContext and detaches all the objects in it.

    Is there any workaround for using the marvelous spring-data-jpa and still being able to use the extended PersistenceContext?

    Or should I place a JIRA request to remove the @Transactional(readOnly = true) annotation on SimpleJpaRepository?