Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/babyfish-ct/jimmer
Browse files Browse the repository at this point in the history
  • Loading branch information
babyfish-ct committed Jun 15, 2023
2 parents 98d5319 + 27e9333 commit db57b0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class Association<S, T> {

这个例子中,我们只查询了中间表本身。所以,`source``target`对象中只有id。

要获获取完整的`source``target`对象,可以表连接,然后利用元组进行返回。
要获取完整的`source``target`对象,可以表连接,然后利用元组进行返回。

代码如下

Expand Down Expand Up @@ -318,7 +318,7 @@ Tuple2{
}
```

:::cuation
:::caution
关联对象`Association<S, T>`很简单也很特殊,不支持也不需要[对象抓取器](./object-fetcher)

注意,这里仅指`Association<S, T>`对象<b>本身</b>不支持,其关联属性`source``target`仍然支持[对象抓取器](./object-fetcher),如:
Expand Down Expand Up @@ -526,4 +526,4 @@ where

:::info
基于中间表的查询,只是为开发人员多提供一种代码书写风格,并不具备不可取代性,用其他手段也可以实现功能和性能形同的查询。
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ val tmpSqlClient =

Jimmer提供按照id *(或id集合)* 查询实体 *(或实体集合)* 的简单API。

默认情况下,这类API是特殊的,它们无视全局过滤器。因为,因为id唯一确定了对象,按照id查询对象忽略过滤器是正确的。
默认情况下,这类API是特殊的,它们无视全局过滤器。因为id唯一确定了对象,按照id查询对象忽略过滤器是正确的。

然而,如果JDBC层面使用了[sharding-jdbc](https://shardingsphere.apache.org/document/4.1.1/en/manual/sharding-jdbc/)技术,且在过滤器中被用作筛选条件的字段就是sharding-jdbc中分库分表的字段,这时,仅仅根据id查询会导致sharding-jdbc查询多个分片,这是灾难。

Expand Down

0 comments on commit db57b0a

Please sign in to comment.