diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java index 1d5eb72..9274add 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java @@ -34,7 +34,7 @@ public interface BookHashRepository extends CrudRepository { */ @Modifying @Query( - value = "DELETE FROM BOOK_HASH i WHERE i.book_id = :bookid", + value = "DELETE FROM BOOK_HASH WHERE book_id = :bookid", nativeQuery = true ) void deleteByBookId(@Param("bookid") Long bookId); diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java index 4e85048..b677b08 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java @@ -57,7 +57,7 @@ public interface BookRepository extends CrudRepository, BookReposito @Override @Modifying @Query( - value = "DELETE FROM Book i WHERE i.id = :id", + value = "DELETE FROM BOOK WHERE id = :id", nativeQuery = true ) void deleteById(@Param("id") Long id);