jpql

Updating Entities with Update Query in Spring Data JPA

March 25, 2015 by

With¬†object-relational mapping (ORM) tools such as Hibernate, one usually modifies¬†entities by first fetching them from the database, modifying some fields, and then persisting the entities again. This is a good approach in many cases, but in some scenarios this may not be desirable. For instance, if you want to update a collection of entities (i.e.… read more