diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 1eb387e8..0c479f12 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -1,5 +1,5 @@ = Spring Data JDBC - Reference Documentation -Jens Schauder, Jay Bryant +Jens Schauder, Jay Bryant, Mark Paluch :revnumber: {version} :revdate: {localdate} :javadoc-base: https://docs.spring.io/spring-data/jdbc/docs/{revnumber}/api/ @@ -13,7 +13,7 @@ Jens Schauder, Jay Bryant :imagesdir: images ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]] :spring-data-commons-docs: https://raw.githubusercontent.com/spring-projects/spring-data-commons/master/src/main/asciidoc -:spring-framework-docs: http://docs.spring.io/spring-framework/docs/{springVersion}/spring-framework-reference/ +:spring-framework-docs: http://docs.spring.io/spring-framework/docs/{springVersion}/ (C) 2018 The original authors. @@ -37,3 +37,7 @@ include::jdbc.adoc[leveloffset=+1] :numbered!: include::faq.adoc[leveloffset=+1] include::glossary.adoc[leveloffset=+1] +include::{spring-data-commons-docs}/repository-namespace-reference.adoc[leveloffset=+1] +include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[leveloffset=+1] +include::repository-query-keywords-reference.adoc[leveloffset=+1] +include::{spring-data-commons-docs}/repository-query-return-types-reference.adoc[leveloffset=+1] diff --git a/src/main/asciidoc/jdbc.adoc b/src/main/asciidoc/jdbc.adoc index b4a76ccd..0ca42aa7 100644 --- a/src/main/asciidoc/jdbc.adoc +++ b/src/main/asciidoc/jdbc.adoc @@ -55,9 +55,9 @@ These are the atomic changes mentioned earlier. A repository is an abstraction over a persistent store that looks like a collection of all the aggregates of a certain type. For Spring Data in general, this means you want to have one `Repository` per aggregate root. In addition, for Spring Data JDBC this means that all entities reachable from an aggregate root are considered to be part of that aggregate root. -It is expected that no table outside that aggregate has a foreign key to a table storing non root entities of the aggregate. +Spring Data JDBC assumes that only the aggregate has a foreign key to a table storing non-root entities of the aggregate and no other entity points toward non-root entities. -WARNING: In the current implementation, entities referenced from an aggregate root get deleted and recreated by Spring Data JDBC. +WARNING: In the current implementation, entities referenced from an aggregate root are deleted and recreated by Spring Data JDBC. You can overwrite the repository methods with implementations that match your style of working and designing your database. @@ -159,10 +159,10 @@ The following table describes the strategies that Spring Data JDBC offers for de |Id-Property inspection (the default)|By default, Spring Data JDBC inspects the identifier property of the given entity. If the identifier property is `null`, then the entity is assumed to be new. Otherwise, it is assumed to not be new. |Implementing `Persistable`|If an entity implements `Persistable`, Spring Data JDBC delegates the new detection to the `isNew(…)` method of the entity. -See the link:$$http://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html$$[JavaDoc] for details. +See the link:$$http://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html$$[Javadoc] for details. |Implementing `EntityInformation`|You can customize the `EntityInformation` abstraction used in the `SimpleJdbcRepository` implementation by creating a subclass of `JdbcRepositoryFactory` and overriding the `getEntityInformation(…)` method. You then have to register the custom implementation of `JdbcRepositoryFactory` as a Spring bean. -Note that this should rarely be necessary. See the link:{javadoc-base}org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.html[JavaDoc] for details. +Note that this should rarely be necessary. See the link:{javadoc-base}org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.html[Javadoc] for details. |=============== [[jdbc.entity-persistence.id-generation]] @@ -392,15 +392,15 @@ The instance can be modified by adding or removing {javadoc-base}/org/springfram [[jdbc.logging]] == Logging -Spring Data JDBC does little to no logging of its own. -Instead, the mechanics to issue SQL statements do provide logging. -Thus, if you want to inspect what SQL statements are you, activate logging for Spring's https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#jdbc-JdbcTemplate[`NamedParameterJdbcTemplate`] or http://www.mybatis.org/mybatis-3/logging.html[MyBatis]. +Spring Data JDBC does little to no logging on its own. +Instead, the mechanics of `JdbcTemplate` to issue SQL statements provide logging. +Thus, if you want to inspect what SQL statements are executed, activate logging for Spring's {spring-framework-docs}/spring-framework-reference/data-access.html#jdbc-JdbcTemplate[`NamedParameterJdbcTemplate`] or http://www.mybatis.org/mybatis-3/logging.html[MyBatis]. [[jdbc.transactions]] == Transactionality CRUD methods on repository instances are transactional by default. For reading operations, the transaction configuration `readOnly` flag is set to `true`. All others are configured with a plain `@Transactional` annotation so that default transaction configuration applies. -For details, see the JavaDoc of link:{javadoc-base}org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.html[`SimpleJdbcRepository`]. If you need to tweak transaction configuration for one of the methods declared in a repository, redeclare the method in your repository interface, as follows: +For details, see the Javadoc of link:{javadoc-base}org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.html[`SimpleJdbcRepository`]. If you need to tweak transaction configuration for one of the methods declared in a repository, redeclare the method in your repository interface, as follows: .Custom transaction configuration for CRUD ==== diff --git a/src/main/asciidoc/repository-query-keywords-reference.adoc b/src/main/asciidoc/repository-query-keywords-reference.adoc new file mode 100644 index 00000000..f5a0a16a --- /dev/null +++ b/src/main/asciidoc/repository-query-keywords-reference.adoc @@ -0,0 +1,7 @@ +[[repository-query-keywords]] +[appendix] += Repository query keywords + +== Supported query keywords + +Spring Data JDBC does not support query derivation yet.