Skip to content

Commit

Permalink
Update documentation for gh-1829
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki43zoo committed Mar 21, 2020
1 parent 3558137 commit 84af95f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/apache/ibatis/annotations/Many.java
Expand Up @@ -37,6 +37,7 @@
* Returns the columnPrefix.
*
* @return the columnPrefix.
* @since 3.5.5
*/
String columnPrefix() default "";

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/apache/ibatis/annotations/One.java
Expand Up @@ -37,6 +37,7 @@
* Returns the columnPrefix.
*
* @return the columnPrefix.
* @since 3.5.5
*/
String columnPrefix() default "";

Expand Down
2 changes: 2 additions & 0 deletions src/site/es/xdoc/java-api.xml
Expand Up @@ -392,6 +392,7 @@ void rollback(boolean force)</source>
Un mapeo a una propiedad que contiene un tipo complejo. Atributos: select, que contiene el nombre completamente cualificado de un mapped statement (o un método de mapper) que puede cargar la instancia del tipo indicado.
<code>fetchType</code>, que sobrescribe el parámetro global de configuración <code>lazyLoadingEnabled</code> para este mapeo.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to a single container object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
Nota: Habrás visto que el mapeo de tipo join no se soporta mediante el API de anotaciones. Esto es debido a las limitaciones de las anotaciones en Java que no permiten referencias circulares.</td>
</tr>
<tr>
Expand All @@ -401,6 +402,7 @@ void rollback(boolean force)</source>
<td>Un mapeo a una propiedad que contiene una colección de tipos complejos. Atributos: select, que contiene el nombre completamente cualificado de un mapped statement (o un método de mapper) que puede cargar la instancia del tipo indicado.
<code>fetchType</code>, que sobrescribe el parámetro global de configuración <code>lazyLoadingEnabled</code> para este mapeo.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to collection object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
Nota: Habrás visto que el mapeo de tipo join no se soporta mediante el API de anotaciones. Esto es debido a las limitaciones de las anotaciones en Java que no permiten referencias circulares.</td>
</tr>
<tr>
Expand Down
6 changes: 4 additions & 2 deletions src/site/ja/xdoc/java-api.xml
Expand Up @@ -397,20 +397,22 @@ void rollback(boolean force)</source>
<td><code>@One</code></td>
<td>N/A</td>
<td><code>&lt;association&gt;</code></td>
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>, <code>resultMap</code>(3.5.5以降で利用可能).
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>, <code>resultMap</code>(3.5.5以降で利用可能), <code>columnPrefix</code>(3.5.5以降で利用可能).
select は適切な型を読み込むことができるマップドステートメント(Mapper メソッド)の完全修飾名です。
fetchType はグローバルな設定 <code>lazyLoadingEnabled</code> をオーバーライドする場合に指定します。
resultMap は結果列を単一のコンテナオブジェクト(JavaBeanなど)へマッピングするための結果マップの完全修飾名を指定します。
columnPrefix はネストした結果マップで結果列をグループ化するためのカラム名のプレフィックスを指定します。
<span class="label important">NOTE</span> アノテーション API では結合マッピングがサポートされていません。これは Java アノテーションでは循環参照が許可されないためです。</td>
</tr>
<tr>
<td><code>@Many</code></td>
<td>N/A</td>
<td><code>&lt;collection&gt;</code></td>
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>, <code>resultMap</code>(3.5.5以降で利用可能).
<td>複雑型のプロパティのマッピング情報を定義します。属性: <code>select</code>, <code>fetchType</code>, <code>resultMap</code>(3.5.5以降で利用可能), <code>columnPrefix</code>(3.5.5以降で利用可能).
select は適切な型のコレクションを読み込むことができるマップドステートメント(Mapper メソッド)の完全修飾名です。
fetchType はグローバルな設定 <code>lazyLoadingEnabled</code> をオーバーライドする場合に指定します。
resultMap は結果列をコレクションオブジェクト(JavaBeanのリストなど)へマッピングするための結果マップの完全修飾名を指定します。
columnPrefix はネストした結果マップで結果列をグループ化するためのカラム名のプレフィックスを指定します。
<span class="label important">NOTE</span> アノテーション API では結合マッピングがサポートされていません。これは Java アノテーションでは循環参照が許可されないためです。</td>
</tr>
<tr>
Expand Down
2 changes: 2 additions & 0 deletions src/site/ko/xdoc/java-api.xml
Expand Up @@ -506,6 +506,7 @@ void rollback(boolean force)</source>
사용가능한 속성들 : select(매핑 구문의 이름, 예를들어 매퍼 메소드).
<code>fetchType</code>, which supersedes the global configuration parameter <code>lazyLoadingEnabled</code> for this mapping.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to a single container object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
Note: 조인 매핑은 애노테이션 API 를 통해서는 지원되지 않는다는 것을 알아야 한다.
순환(circular) 참조를 허용하지 않는 자바 애노테이션의 제약사항때문이다.</td>
</tr>
Expand All @@ -517,6 +518,7 @@ void rollback(boolean force)</source>
사용가능한 속성들 : select(매핑 구문의 이름, 예를들어 매퍼 메소드)
<code>fetchType</code>, which supersedes the global configuration parameter <code>lazyLoadingEnabled</code> for this mapping.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to collection object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
Note: 조인 매핑은 애노테이션 API 를 통해서는 지원되지 않는다는 것을 알아야 한다.
순환(circular) 참조를 허용하지 않는 자바 애노테이션의 제약사항때문이다.</td>
</tr>
Expand Down
2 changes: 2 additions & 0 deletions src/site/xdoc/java-api.xml
Expand Up @@ -423,6 +423,7 @@ void rollback(boolean force)</source>
mapping.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to
a single container object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
<span class="label important">NOTE</span> You will notice that join mapping is not supported via the Annotations API.
This is due to the limitation in Java Annotations that does not allow for circular references.</td>
</tr>
Expand All @@ -436,6 +437,7 @@ void rollback(boolean force)</source>
mapping.
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to
collection object from select result.
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
<span class="label important">NOTE</span> You will notice that join mapping is not supported via the
Annotations API. This is due to the limitation in Java Annotations that does not allow for circular references.</td>
</tr>
Expand Down
6 changes: 4 additions & 2 deletions src/site/zh/xdoc/java-api.xml
Expand Up @@ -388,7 +388,8 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
       <td>复杂类型的单个属性映射。属性:
<code>select</code>,指定可加载合适类型实例的映射语句(也就是映射器方法)全限定名;
<code>fetchType</code>,指定在该映射中覆盖全局配置参数 <code>lazyLoadingEnabled</code>;
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to a single container object from select result。
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to a single container object from select result;
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
<span class="label important">提示</span> 注解 API 不支持联合映射。这是由于 Java 注解不允许产生循环引用。</td>
</tr>
<tr>
Expand All @@ -398,7 +399,8 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
       <td>复杂类型的集合属性映射。属性:
<code>select</code>,指定可加载合适类型实例集合的映射语句(也就是映射器方法)全限定名;
<code>fetchType</code>,指定在该映射中覆盖全局配置参数 <code>lazyLoadingEnabled</code>
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to collection object from select result。
<code>resultMap</code>(available since 3.5.5), which is the fully qualified name of a result map that map to collection object from select result;
<code>columnPrefix</code>(available since 3.5.5), which is column prefix for grouping select columns at nested result map.
<span class="label important">提示</span> 注解 API 不支持联合映射。这是由于 Java 注解不允许产生循环引用。</td>
</tr>
<tr>
Expand Down

1 comment on commit 84af95f

@harawata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally forgot about docs. Thank you, @kazuki43zoo !

Please sign in to comment.