[client-v2,jdbc-v2] Adds JPA example to Demo Service#2301
Conversation
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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.
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.
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 |
There was a problem hiding this comment.
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. |
|



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