Skip to content

Commit d1654a6

Browse files
update
1 parent 1fcaf4a commit d1654a6

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

src/site/markdown/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ This feature is disabled by default. If you specify a default value into placeho
102102
These are extremely important tweaks that modify the way that MyBatis behaves at runtime. The following table describes the settings, their meanings and their default values.
103103

104104
| Setting | Description | Valid Values | Default |
105-
| ---------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------- |
105+
| ---------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------------------------------------------- |
106106
| cacheEnabled | Globally enables or disables any caches configured in any mapper under this configuration. | true \| false | true |
107107
| lazyLoadingEnabled | Globally enables or disables lazy loading. When enabled, all relations will be lazily loaded. This value can be superseded for a specific relation by using the `fetchType` attribute on it. | true \| false | false |
108108
| aggressiveLazyLoading | When enabled, any method call will load all the lazy properties of the object. Otherwise, each property is loaded on demand (see also `lazyLoadTriggerMethods`). | true \| false | false (true in ≤3.4.1) |
109109
| multipleResultSetsEnabled | Allows or disallows multiple ResultSets to be returned from a single statement (compatible driver required). | true \| false | true |
110110
| useColumnLabel | Uses the column label instead of the column name. Different drivers behave differently in this respect. Refer to the driver documentation, or test out both modes to determine how your driver behaves. | true \| false | true |
111111
| useGeneratedKeys | Allows JDBC support for generated keys. A compatible driver is required. This setting forces generated keys to be used if set to true, as some drivers deny compatibility but still work (e.g. Derby). | true \| false | False |
112112
| autoMappingBehavior | Specifies if and how MyBatis should automatically map columns to fields/properties. NONE disables auto-mapping. PARTIAL will only auto-map results with no nested result mappings defined inside. FULL will auto-map result mappings of any complexity (containing nested or otherwise). | NONE, PARTIAL, FULL | PARTIAL |
113-
| autoMappingUnknownColumnBehavior | Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.<ul><li>`NONE`: Do nothing</li><li>`WARNING`: Output warning log (The log level of `'org.apache.ibatis.session.AutoMappingUnknownColumnBehavior'` must be set to `WARN`)</li><li>`FAILING`: Fail mapping (Throw `SqlSessionException`)</li></ul> | NONE, WARNING, FAILING | NONE |
113+
| autoMappingUnknownColumnBehavior | Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.<ul><li>`NONE`: Do nothing</li><li>`WARNING`: Output warning log (The log level of `'org.apache.ibatis.session.AutoMappingUnknownColumnBehavior'` must be set to `WARN`)</li><li>`FAILING`: Fail mapping (Throw `SqlSessionException`)</li></ul>Note that there could be false-positives when `autoMappingBehavior` is set to `FULL`. | NONE, WARNING, FAILING | NONE |
114114
| defaultExecutorType | Configures the default executor. SIMPLE executor does nothing special. REUSE executor reuses prepared statements. BATCH executor reuses statements and batches updates. | SIMPLE REUSE BATCH | SIMPLE |
115115
| defaultStatementTimeout | Sets the number of seconds the driver will wait for a response from the database. | Any positive integer | Not Set (null) |
116116
| defaultFetchSize | Sets the driver a hint as to control fetching size for return results. This parameter value can be override by a query setting. | Any positive integer | Not Set (null) |

src/site/markdown/sqlmap-xml.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,24 @@ The select element has more attributes that allow you to configure the details o
6565
resultSetType="FORWARD_ONLY">
6666
```
6767

68-
| Attribute | Description |
69-
| ------------------- | ------------------------------------------------------------ |
70-
| `id` | A unique identifier in this namespace that can be used to reference this statement. |
71-
| `parameterType` | The fully qualified class name or alias for the parameter that will be passed into this statement. This attribute is optional because MyBatis can calculate the TypeHandler to use out of the actual parameter passed to the statement. Default is `unset`. |
72-
| ~~`parameterMap`~~ | ~~This is a deprecated approach to referencing an external `parameterMap`. Use inline parameter mappings and the `parameterType` attribute.~~ |
73-
| `resultType` | The fully qualified class name or alias for the expected type that will be returned from this statement. Note that in the case of collections, this should be the type that the collection contains, not the type of the collection itself. Use `resultType` OR `resultMap`, not both. |
74-
| `resultMap` | A named reference to an external `resultMap`. Result maps are the most powerful feature of MyBatis, and with a good understanding of them, many difficult mapping cases can be solved. Use `resultMap` OR `resultType`, not both. |
75-
| `flushCache` | Setting this to true will cause the local and 2nd level caches to be flushed whenever this statement is called. Default: `false` for select statements. |
76-
| `useCache` | Setting this to true will cause the results of this statement to be cached in 2nd level cache. Default: `true` for select statements. |
77-
| `timeout` | This sets the number of seconds the driver will wait for the database to return from a request, before throwing an exception. Default is `unset` (driver dependent). |
78-
| `fetchSize` | This is a driver hint that will attempt to cause the driver to return results in batches of rows numbering in size equal to this setting. Default is `unset` (driver dependent). |
79-
| `statementType` | Any one of `STATEMENT`, `PREPARED` or `CALLABLE`. This causes MyBatis to use `Statement`, `PreparedStatement` or `CallableStatement` respectively. Default: `PREPARED`. |
80-
| `resultSetType` | Any one of `FORWARD_ONLY`\|`SCROLL_SENSITIVE`\|`SCROLL_INSENSITIVE`\|`DEFAULT`(same as unset). Default is `unset` (driver dependent). |
81-
| `databaseId` | In case there is a configured databaseIdProvider, MyBatis will load all statements with no `databaseId` attribute or with a `databaseId` that matches the current one. If case the same statement if found with and without the `databaseId` the latter will be discarded. |
68+
| Attribute | Description |
69+
| ------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
70+
| `id` | A unique identifier in this namespace that can be used to reference this statement. |
71+
| `parameterType` | The fully qualified class name or alias for the parameter that will be passed into this statement. This attribute is optional because MyBatis can calculate the TypeHandler to use out of the actual parameter passed to the statement. Default is `unset`. |
72+
| ~~`parameterMap`~~ | ~~This is a deprecated approach to referencing an external `parameterMap`. Use inline parameter mappings and the `parameterType` attribute.~~ |
73+
| `resultType` | The fully qualified class name or alias for the expected type that will be returned from this statement. Note that in the case of collections, this should be the type that the collection contains, not the type of the collection itself. Use `resultType` OR `resultMap`, not both. |
74+
| `resultMap` | A named reference to an external `resultMap`. Result maps are the most powerful feature of MyBatis, and with a good understanding of them, many difficult mapping cases can be solved. Use `resultMap` OR `resultType`, not both. |
75+
| `flushCache` | Setting this to true will cause the local and 2nd level caches to be flushed whenever this statement is called. Default: `false` for select statements. |
76+
| `useCache` | Setting this to true will cause the results of this statement to be cached in 2nd level cache. Default: `true` for select statements. |
77+
| `timeout` | This sets the number of seconds the driver will wait for the database to return from a request, before throwing an exception. Default is `unset` (driver dependent). |
78+
| `fetchSize` | This is a driver hint that will attempt to cause the driver to return results in batches of rows numbering in size equal to this setting. Default is `unset` (driver dependent). |
79+
| `statementType` | Any one of `STATEMENT`, `PREPARED` or `CALLABLE`. This causes MyBatis to use `Statement`, `PreparedStatement` or `CallableStatement` respectively. Default: `PREPARED`. |
80+
| `resultSetType` | Any one of `FORWARD_ONLY`\ |`SCROLL_SENSITIVE`\|`SCROLL_INSENSITIVE`\|`DEFAULT`(same as unset). Default is `unset` (driver dependent). |
81+
| `databaseId` | In case there is a configured databaseIdProvider, MyBatis will load all statements with no `databaseId` attribute or with a `databaseId` that matches the current one. If case the same statement if found with and without the `databaseId` the latter will be discarded. |
8282
| `resultOrdered` | This is only applicable for nested result select statements: If this is true, it is assumed that nested results are contained or grouped together such that when a new main result row is returned, no references to a previous result row will occur anymore. This allows nested results to be filled much more memory friendly. Default: `false`. |
83-
| `resultSets` | This is only applicable for multiple result sets. It lists the result sets that will be returned by the statement and gives a name to each one. Names are separated by commas. |
84-
|[Select Attributes] ||
83+
| `resultSets` | This is only applicable for multiple result sets. It lists the result sets that will be returned by the statement and gives a name to each one. Names are separated by commas. |
84+
| `affectData` | Set this to true when writing a INSERT, UPDATE or DELETE statement that returns data so that the transaction is controlled properly. Also see [Transaction Control Method](./java-api.html#transaction-control-methods). Default: `false` (since 3.5.12) |
85+
[Select Attributes]
8586

8687
### insert, update and delete
8788

@@ -658,7 +659,7 @@ Since 3.4.3, by specifying the name of each parameter, you can write arg element
658659
</constructor>
659660
```
660661

661-
`javaType` can be omitted if there is a property with the same name and type.
662+
`javaType` can be omitted if there is a writable property with the same name and type.
662663

663664
The rest of the attributes and rules are the same as for the regular id and result elements.
664665

0 commit comments

Comments
 (0)