Skip to content

Commit

Permalink
Added CONTRIBUTING.md and CHANGELOG.md (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillKurdyukov authored Jan 23, 2024
2 parents a0281e1 + f0e8fa4 commit a64137d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

<!--- Please provide a general summary of your changes in the title above -->

## Pull request type

<!-- Please try to limit your pull request to one types, submit multiple pull requests if needed. -->

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?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by this PR. -->

-
-
-

## Other information

<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
19 changes: 18 additions & 1 deletion hibernate-dialect-v5/NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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<Book>
```

0 comments on commit a64137d

Please sign in to comment.