-
Notifications
You must be signed in to change notification settings - Fork 3.4k
#441 - Demonstrating how to do direct inserts with the JdbcAggregateTemplate. #441
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
f483c9c
to
f6fd27f
Compare
.../basics/src/main/java/example/springdata/jdbc/basics/simpleentity/CategoryConfiguration.java
Outdated
Show resolved
Hide resolved
@@ -61,4 +61,13 @@ public void exerciseRepositoryForSimpleEntity() { | |||
repository.delete(cars); | |||
Output.list(repository.findAll(), "`Cars` is gone."); | |||
} | |||
|
|||
@Test | |||
public void directInsert(){ |
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.
Shouldn't we rather point out the simple-most approach which would be direct JdbcAggregateOperations
usage?
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.
I'm not sure.
As the intense discussion about DATAJDBC-282 shows many people want the insert method in their repositories.
With the custom method, they get just that.
Also, I guess most Spring Data JDBC users come from Spring Data JPA and don't even know about templates.
I'd rather leave it as it is.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * http://ethlo.com/maven (301) with 2 occurrences migrated to: https://ethlo.com/maven ([https](https://ethlo.com/maven) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://maven.apache.org/xsd/maven-4.0.0.xsd with 70 occurrences migrated to: https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200). * http://maven.apache.org/maven-v4_0_0.xsd with 6 occurrences migrated to: https://maven.apache.org/maven-v4_0_0.xsd ([https](https://maven.apache.org/maven-v4_0_0.xsd) result 301). * http://projects.spring.io/spring-data-cassandra with 1 occurrences migrated to: https://projects.spring.io/spring-data-cassandra ([https](https://projects.spring.io/spring-data-cassandra) result 301). * http://projects.spring.io/spring-data-jdbc with 1 occurrences migrated to: https://projects.spring.io/spring-data-jdbc ([https](https://projects.spring.io/spring-data-jdbc) result 301). * http://projects.spring.io/spring-data-jpa with 1 occurrences migrated to: https://projects.spring.io/spring-data-jpa ([https](https://projects.spring.io/spring-data-jpa) result 301). * http://projects.spring.io/spring-data-ldap with 1 occurrences migrated to: https://projects.spring.io/spring-data-ldap ([https](https://projects.spring.io/spring-data-ldap) result 301). * http://projects.spring.io/spring-data-mongodb with 1 occurrences migrated to: https://projects.spring.io/spring-data-mongodb ([https](https://projects.spring.io/spring-data-mongodb) result 301). * http://projects.spring.io/spring-data-solr with 1 occurrences migrated to: https://projects.spring.io/spring-data-solr ([https](https://projects.spring.io/spring-data-solr) result 301). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 with 152 occurrences * http://www.w3.org/2001/XMLSchema-instance with 76 occurrences Original pull request: #469
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to: https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200). * [ ] http://www.apache.org/licenses/LICENSE-2.0 with 428 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
Reuse provided configuration for NamedParameterJdbcOperations. Use listeners and EntityCallbacks. Remove explicit dependency versions.
That's polished and merged now. |
See also: https://jira.spring.io/browse/DATAJDBC-282