You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/jdbc/events.adoc
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Events and callbacks get only triggered for aggregate roots.
9
9
If you want to process non-root entities, you need to do that through a listener for the containing aggregate root.
10
10
11
11
Entity lifecycle events can be costly, and you may notice a change in the performance profile when loading large result sets.
12
-
You can disable lifecycle events on the link:{spring-data-jdbc-javadoc}org/springframework/data/jdbc/core/JdbcAggregateTemplate.html#setEntityLifecycleEventsEnabled(boolean)[Template API].
12
+
You can disable lifecycle events on javadoc:org.springframework.data.jdbc.core.JdbcAggregateTemplate#setEntityLifecycleEventsEnabled(boolean)[Template API].
13
13
14
14
For example, the following listener gets invoked before an aggregate gets saved:
15
15
@@ -46,22 +46,22 @@ The following table describes the available events.For more details about the ex
| Before an aggregate root gets converted into a plan for executing SQL statements, but after the decision was made if the aggregate is new or not, i.e. if an update or an insert is in order.
| This is the correct callback if you want to set an id programmatically. In the previous step new aggregates got detected as such and a Id generated in this step would be used in the following step.
92
92
93
93
2+| Convert the aggregate to a aggregate change, it is a sequence of SQL statements to be executed against the database. In this step the decision is made if an Id is provided by the aggregate or if the Id is still empty and is expected to be generated by the database.
| Changes made to the aggregate root may get considered, but the decision if an id value will be sent to the database is already made in the previous step.
97
97
Do not use this for creating Ids for new aggregates. Use `BeforeConvertCallback` instead.
98
98
99
99
2+| The SQL statements determined above get executed against the database.
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/jdbc/getting-started.adoc
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ class ApplicationConfig extends AbstractJdbcConfiguration {
129
129
----
130
130
131
131
<1> `@EnableJdbcRepositories` creates implementations for interfaces derived from `Repository`
132
-
<2> `AbstractJdbcConfiguration` provides various default beans required by Spring Data JDBC
132
+
<2> javadoc:org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration[] provides various default beans required by Spring Data JDBC
133
133
<3> Creates a `DataSource` connecting to a database.
134
134
This is required by the following two bean methods.
135
135
<4> Creates the `NamedParameterJdbcOperations` used by Spring Data JDBC to access the database.
@@ -139,7 +139,7 @@ The configuration class in the preceding example sets up an embedded HSQL databa
139
139
The `DataSource` is then used to set up `NamedParameterJdbcOperations` and a `TransactionManager`.
140
140
We finally activate Spring Data JDBC repositories by using the `@EnableJdbcRepositories`.
141
141
If no base package is configured, it uses the package in which the configuration class resides.
142
-
Extending `AbstractJdbcConfiguration` ensures various beans get registered.
142
+
Extending javadoc:org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration[] ensures various beans get registered.
143
143
Overwriting its methods can be used to customize the setup (see below).
144
144
145
145
This configuration can be further simplified by using Spring Boot.
@@ -152,7 +152,7 @@ There are a couple of things one might want to customize in this setup.
152
152
== Dialects
153
153
154
154
Spring Data JDBC uses implementations of the interface `Dialect` to encapsulate behavior that is specific to a database or its JDBC driver.
155
-
By default, the `AbstractJdbcConfiguration` attempts to determine the dialect from the database configuration by obtaining a connection and registering the correct `Dialect`.
155
+
By default, the javadoc:org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration[] attempts to determine the dialect from the database configuration by obtaining a connection and registering the correct `Dialect`.
156
156
You override `AbstractJdbcConfiguration.jdbcDialect(NamedParameterJdbcOperations)` to customize dialect selection.
157
157
158
158
If you use a database for which no dialect is available, then your application won’t start up.
@@ -161,8 +161,8 @@ Alternatively, you can implement your own `Dialect`.
161
161
162
162
[TIP]
163
163
====
164
-
Dialects are resolved by {spring-data-jdbc-javadoc}/org/springframework/data/jdbc/repository/config/DialectResolver.html[`DialectResolver`] from a `JdbcOperations` instance, typically by inspecting `Connection.getMetaData()`.
165
-
+ You can let Spring auto-discover your `JdbcDialect` by registering a class that implements `org.springframework.data.jdbc.repository.config.DialectResolver$JdbcDialectProvider` through `META-INF/spring.factories`.
164
+
Dialects are resolved by javadoc:org.springframework.data.jdbc.repository.config.DialectResolver[] from a `JdbcOperations` instance, typically by inspecting `Connection.getMetaData()`.
165
+
+ You can let Spring auto-discover your javadoc:org.springframework.data.jdbc.core.dialect.JdbcDialect[] by registering a class that implements `org.springframework.data.jdbc.repository.config.DialectResolver$JdbcDialectProvider` through `META-INF/spring.factories`.
166
166
`DialectResolver` discovers dialect provider implementations from the class path using Spring's `SpringFactoriesLoader`.
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
The methods of `CrudRepository` instances are transactional by default.
5
5
For reading operations, the transaction configuration `readOnly` flag is set to `true`.
6
6
All others are configured with a plain `@Transactional` annotation so that default transaction configuration applies.
7
-
For details, see the Javadoc of link:{spring-data-jdbc-javadoc}org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.html[`SimpleJdbcRepository`].
7
+
For details, see the Javadoc of javadoc:org.springframework.data.jdbc.repository.support.SimpleJdbcRepository[].
8
8
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:
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/partials/mapping.adoc
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@
3
3
4
4
By convention, Spring Data applies a `NamingStrategy` to determine table, column, and schema names defaulting to https://en.wikipedia.org/wiki/Snake_case[snake case].
5
5
An object property named `firstName` becomes `first_name`.
6
-
You can tweak that by providing a {spring-data-jdbc-javadoc}org/springframework/data/relational/core/mapping/NamingStrategy.html[`NamingStrategy`] in your application context.
6
+
You can tweak that by providing a javadoc:org.springframework.data.relational.core.mapping.NamingStrategy[] in your application context.
7
7
8
8
[[entity-persistence.custom-table-name]]
9
9
== Override table names
10
10
11
-
When the table naming strategy does not match your database table names, you can override the table name with the {spring-data-jdbc-javadoc}org/springframework/data/relational/core/mapping/Table.html[`@Table`] annotation.
11
+
When the table naming strategy does not match your database table names, you can override the table name with the javadoc:org.springframework.data.relational.core.mapping.Table[] annotation.
12
12
The element `value` of this annotation provides the custom table name.
13
13
The following example maps the `MyEntity` class to the `CUSTOM_TABLE_NAME` table in the database:
14
14
@@ -26,7 +26,7 @@ class MyEntity {
26
26
[[entity-persistence.custom-column-name]]
27
27
== Override column names
28
28
29
-
When the column naming strategy does not match your database table names, you can override the table name with the {spring-data-jdbc-javadoc}org/springframework/data/relational/core/mapping/Column.html[`@Column`] annotation.
29
+
When the column naming strategy does not match your database table names, you can override the table name with the javadoc:org.springframework.data.relational.core.mapping.Column[] annotation.
30
30
The element `value` of this annotation provides the custom column name.
31
31
The following example maps the `name` property of the `MyEntity` class to the `CUSTOM_COLUMN_NAME` column in the database:
32
32
@@ -43,7 +43,7 @@ class MyEntity {
43
43
44
44
ifdef::mapped-collection[]
45
45
46
-
The {spring-data-jdbc-javadoc}org/springframework/data/relational/core/mapping/MappedCollection.html[`@MappedCollection`]
46
+
The javadoc:org.springframework.data.relational.core.mapping.MappedCollection[]
47
47
annotation can be used on a reference type (one-to-one relationship) or on Sets, Lists, and Maps (one-to-many relationship).
48
48
`idColumn` element of the annotation provides a custom name for the foreign key column referencing the id column in the other table.
49
49
In the following example the corresponding table for the `MySubEntity` class has a `NAME` column, and the `CUSTOM_MY_ENTITY_ID_COLUMN_NAME` column of the `MyEntity` id for relationship reasons:
@@ -64,7 +64,7 @@ class MySubEntity {
64
64
----
65
65
66
66
When using `List` and `Map` you must have an additional column for the position of a dataset in the `List` or the key value of the entity in the `Map`.
67
-
This additional column name may be customized with the `keyColumn` Element of the {spring-data-jdbc-javadoc}org/springframework/data/relational/core/mapping/MappedCollection.html[`@MappedCollection`] annotation:
67
+
This additional column name may be customized with the `keyColumn` Element of the javadoc:org.springframework.data.relational.core.mapping.MappedCollection[] annotation:
0 commit comments