From 5d2b648ab397f6198937849dfa5daae45165bccd Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Fri, 9 Oct 2020 11:07:53 +0300 Subject: [PATCH] Add warning statement about custom queries Signed-off-by: Pekka Helenius --- .../bookstore/model/book/BookRepositoryImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java index a0139bc..c909da1 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java @@ -24,6 +24,15 @@ public class BookRepositoryImpl implements BookRepositoryCustom { @PersistenceContext EntityManager entityManager; + /* + * WARNING: Custom queries MAY BREAK in some SQL server implementations. + * Basically, a custom query can work in MySQL server environment whereas it breaks + * in PostgreSQL or Microsoft SQL server context. + * + * Make sure that any custom query you define is properly supported by your target + * SQL server. + */ + /* * Selective update * Hibernate takes care of entityManager transactions (begin, commit, rollback, close, etc.)