-
Notifications
You must be signed in to change notification settings - Fork 614
[client-v2,jdbc-v2] Adds JPA example to Demo Service #2301
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
Conversation
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.
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- examples/demo-service/build.gradle.kts: Language not supported
- examples/demo-service/src/main/resources/application.properties: Language not supported
Comments suppressed due to low confidence (1)
examples/demo-service/src/main/java/com/clickhouse/demo_service/jpa/ClickHouseStringArrayType.java:37
- [nitpick] Consider renaming the iteration variable 'i' to 'item' for improved clarity.
for (Object i : (Object[]) array.getArray() ) {
| } | ||
|
|
||
| @Override | ||
| public boolean isMutable() { |
Copilot
AI
Apr 14, 2025
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.
The isMutable() method returns false, yet deepCopy() creates a new modifiable ArrayList. Either mark the type as mutable or return an unmodifiable collection to maintain consistency.
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.
isMutable() relates to column of this type and so deepCopy() is not linked here. However you might be correct that column should be treated as mutable.
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.
This should stay false to mark value as immutable just for safety. Wrapping with Collections.unmodifiableList() will add performance overhead.
examples/demo-service/README.md
Outdated
| This is and example of a Spring Boot service using ClickHouse client directly and via JPA. | ||
| Example is an application that requires ClickHouse DB running externally. It can be a Docker or |
Copilot
AI
Apr 14, 2025
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.
Typographical error: 'and example' should be corrected to 'an example'.
| This is and example of a Spring Boot service using ClickHouse client directly and via JPA. | |
| Example is an application that requires ClickHouse DB running externally. It can be a Docker or | |
| This is an example of a Spring Boot service using ClickHouse client directly and via JPA. |
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.
Will do.
|



Summary
Adds a simple demonstration of using ClickHouse JDBC driver with JPA.
Checklist
Delete items not relevant to your PR: