Browse Source

Fix delete queries for MariaDB

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.4-alpha
Pekka Helenius 4 years ago
parent
commit
8b53fed77a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java
  2. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java

+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java View File

@ -34,7 +34,7 @@ public interface BookHashRepository extends CrudRepository<BookHash, String> {
*/ */
@Modifying @Modifying
@Query( @Query(
value = "DELETE FROM BOOK_HASH i WHERE i.book_id = :bookid",
value = "DELETE FROM BOOK_HASH WHERE book_id = :bookid",
nativeQuery = true nativeQuery = true
) )
void deleteByBookId(@Param("bookid") Long bookId); void deleteByBookId(@Param("bookid") Long bookId);


+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java View File

@ -57,7 +57,7 @@ public interface BookRepository extends CrudRepository<Book, Long>, BookReposito
@Override @Override
@Modifying @Modifying
@Query( @Query(
value = "DELETE FROM Book i WHERE i.id = :id",
value = "DELETE FROM BOOK WHERE id = :id",
nativeQuery = true nativeQuery = true
) )
void deleteById(@Param("id") Long id); void deleteById(@Param("id") Long id);


Loading…
Cancel
Save