-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Multi-Database Support] Without Reliance on globally_quoted_identifiers Variable #4749
[Multi-Database Support] Without Reliance on globally_quoted_identifiers Variable #4749
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4749 +/- ##
============================================
+ Coverage 47.16% 47.28% +0.12%
- Complexity 1656 1661 +5
============================================
Files 349 349
Lines 10691 10691
Branches 1062 1062
============================================
+ Hits 5042 5055 +13
+ Misses 5343 5329 -14
- Partials 306 307 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There are some errors when tested on my laptop...It looks like the
|
It works after I changed the table name to `Release`. So I suppose we need to check whether there are more tables/columns need to be manually quoted? @Entity
@Table(name = "`Release`")
@SQLDelete(sql = "Update Release set IsDeleted = 1, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?")
@Where(clause = "isDeleted = 0")
public class Release extends BaseEntity { |
521ce82
to
2686e1c
Compare
@nobodyiam Thanks, I will double checked with Mysql keywords first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Setting globally_quoted_identifiers Variable to true will restrict running on other databases, like h2, postgre. We can easily setting globally_quoted_identifiers to false, and manual use ` wrap the database field. That's what I do in #4745
Tested on my laptop.
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.