From f0e8fa4048a17d4bf126a06bd85ed4c1c5652cab Mon Sep 17 00:00:00 2001 From: Kirill Kurdyukov Date: Tue, 23 Jan 2024 19:57:12 +0300 Subject: [PATCH] Added CONTRIBUTING.md and CHANGELOG.md --- .github/PULL_REQUEST_TEMPLATE.md | 35 ++++++++++++++++++++++++++++++++ hibernate-dialect-v5/NOTES.md | 19 ++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..2708e93 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,35 @@ +I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en + + + +## Pull request type + + + +Please check the type of change your PR introduces: + +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update (formatting, renaming) +- [ ] Refactoring (no functional changes, no api changes) +- [ ] Build related changes +- [ ] Documentation content changes +- [ ] Other (please describe): + +## What is the current behavior? + + + +Issue Number: N/A + +## What is the new behavior? + + + +- +- +- + +## Other information + + \ No newline at end of file diff --git a/hibernate-dialect-v5/NOTES.md b/hibernate-dialect-v5/NOTES.md index 43c67c5..c6090c0 100644 --- a/hibernate-dialect-v5/NOTES.md +++ b/hibernate-dialect-v5/NOTES.md @@ -1,8 +1,9 @@ -### ORDER BY ? +#### 1. ORDER BY ? The ORDER BY clause generates SQL that uses the original column names of the table, instead of the aliases that were previously specified. +At the moment, this is an incorrect YDB request. ```sql select @@ -15,4 +16,20 @@ from Students student0_ order by student0_.name_ At the moment, our solution to this problem is to use native SQL for queries or upgrade to Hibernate 6. +#### 2. ESCAPE ? GENERATED BY Spring Data JPA +The Spring Data JPA framework generates the `LAKE ? ESCAPE ?` clause +when the repository method signature contains the substring `ByFieldContains`. +At the moment, this is an incorrect YDB request. ESCAPE don't have param. + +--- + +Here is an example solution to problems 1 and 2 using native SQL: + +```kotlin +@Query( + "SELECT * FROM books WHERE books.title LIKE %:title% ORDER BY books.publication_date", + nativeQuery = true +) +fun findBooksByTitleContainsOrderByPublicationDate(title: String, pageable: Pageable): Slice +```