package bg.car_wash.areas.car.repository;

import bg.car_wash.areas.car.entity.Car;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface CarRepository extends JpaRepository<Car, Long> {

	Car findCarByCarRegistrationNumber(String registrationNUmber);

	void deleteCarById(Long id);

	Car findCarById(Long id);
}

@@ -190,16 +190,57 @@
 itory;%0A%0A
+import javax.transaction.Transactional;%0A%0A
 @Reposit
@@ -375,16 +375,32 @@
 mber);%0A%0A
+%09@Transactional%0A
 %09void de
@@ -422,16 +422,32 @@
 g id);%0A%0A
+%09@Transactional%0A
 %09Car fin

add @Transactional - throw exception without annotation