Я хочу реализовать репозиторий с запросом на удаление.
@Repository
public interface LogRepository extends JpaRepository<Log, Integer>, JpaSpecificationExecutor<Log> {
@Modifying
@Query("delete from " + Log.class.getName() + " r where r.createdAt <= ?1")
int deleteByCreatedAt(LocalDateTime createdAt);
}
Но я получаю ошибку The value for annotation attribute Query.value must be a constant expression
Есть ли способ реализовать это?