Simple Repository
Simple variant of CRUDRepository
This is meant to be implemented from a @Repository interface.
Parameters
I
Id type of the data
E
Entity type of the data which is a SimpleEntity
Inherited functions
Link copied to clipboard
Finds all entities for given pagination and deletion flag
Link copied to clipboard
Finds an entity with given id and deletion flag
Link copied to clipboard
@Modifying(clearAutomatically = true, flushAutomatically = true )
@Query(value = "UPDATE #{#entityName} e
SET e = :entity, e.version = :#{#entity.version} + 1
WHERE e.id = :#{#entity.id} AND e.version = :#{#entity.version}" )
Updates given entity if it is at set version using optimistic locking