About 52 results
Open links in new tab
  1. Why do we have to use @Modifying annotation for queries in Data Jpa?

    1 When you use only @Query annotation,you should use select queries However you @Modifying annotation you can use insert,delete,update queries above the method.

  2. java - Do we need both @Transactional and @Modifying annotation in ...

    Jan 18, 2018 · Yes you need @Transactional when modifying data even with @Modifying that is only an annotation to let Spring Data know you have a @Query that changes stuff. The @Transactional …

  3. Spring Data JPA @Modifying annotation usage with @Transactional

    Nov 12, 2021 · Second question first: the Modifying annotation lets you execute DML (inserts, updates, deletes) and DDL using JPA Query annotations where you put the DML or DDL where the query …

  4. java - Is there any use for Spring Data JPA's @Modifying without ...

    Jan 15, 2021 · AFAIK @Modifying is there to take care of persistence context cleanup in case of INSERT/UPDATE/DELETE queries specified in @Query annotation. But what is pure @Modifying …

  5. java - Why do I have to use @Modifying with @Transactional in spring ...

    Feb 21, 2020 · Whenever implementing data modifying logic using Query annotation (insert, update or delete) in JpaRepository, both @Transactional (not necessarily on the repository method) and …

  6. spring-data-jpa to insert using @Query & @Modifying without using ...

    Aug 18, 2017 · -1 @Query Usually used to Create custom User Query to fetch the value from Data Base @Query with @Modifying used to perform the update operation in database save method used to …

  7. How to update the JPA/Hibernate @Version field in a Spring Data JPA ...

    May 2, 2010 · @Modifying @Query("UPDATE User u SET u.active = false WHERE u.id IN :ids") void deactivateAll(@Param("ids") Iterable<Long> ids); } As the version field is not automatically increased …

  8. sql - Stop Oracle from reading/modifying an object after modifying it ...

    Aug 13, 2021 · Stop Oracle from reading/modifying an object after modifying it in parallel Ask Question Asked 4 years, 7 months ago Modified 4 years, 7 months ago

  9. spring - Can I skip writing flushAutomatically=true in Modifying ...

    Jul 21, 2021 · For example, instead of @Modifying(flushAutomatically = true) Only @Modifying I do understand the main point of it - to flush all cache to DB before querying. But after we write @Query, …

  10. what does the return value of @Modifying methods in Spring Data JPA ...

    Apr 2, 2014 · what does the return value of @Modifying methods in Spring Data JPA mean Ask Question Asked 11 years, 11 months ago Modified 1 year, 9 months ago