Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm run docs:preview

### Prerequisites

- `node` (version 18 or newer) - JavaScript runtime required by Vite/VitePress
- `node` (version 22 or newer) - JavaScript runtime required by Vite/VitePress
- `npm` - Package manager (included with most Node.js installations)
- `git` - Required to install `@cakephp/docs-skeleton` from GitHub

Expand Down
2 changes: 1 addition & 1 deletion docs/en/orm/behaviors.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ a perfect fit for.

## Using Behaviors

<!--@include: ./table-objects.md{414,460}-->
<!--@include: ./table-objects.md#behaviors-->

## Core Behaviors

Expand Down
4 changes: 2 additions & 2 deletions docs/en/orm/query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1905,11 +1905,11 @@ data, you first need to setup associations between the tables as described in
the [Associations - Linking Tables Together](../orm/associations) section. This technique of combining queries
to fetch associated data from other tables is called **eager loading**.

<!--@include: ./retrieving-data-and-resultsets.md{507,719}-->
<!--@include: ./retrieving-data-and-resultsets.md#contain-->

### Filtering by Associated Data

<!--@include: ./retrieving-data-and-resultsets.md{727,938}-->
<!--@include: ./retrieving-data-and-resultsets.md#filtering-->

### Adding Joins

Expand Down
8 changes: 4 additions & 4 deletions docs/en/orm/retrieving-data-and-resultsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ By default, CakePHP does not load **any** associated data when using `find()`.
You need to 'contain' or eager-load each association you want loaded in your
results.

<!-- start-contain -->
<!-- #region contain -->

Eager loading helps avoid many of the potential performance problems
surrounding lazy-loading in an ORM. The queries generated by eager loading can
Expand Down Expand Up @@ -739,13 +739,13 @@ $query->contain([
]);
```

<!-- end-contain -->
<!-- #endregion contain -->

<a id="filtering-by-associated-data"></a>

## Filtering by Associated Data Via Matching And Joins

<!-- start-filtering -->
<!-- #region filtering -->

A fairly common query case with associations is finding records 'matching'
specific associated data. For example if you have 'Articles belongsToMany Tags'
Expand Down Expand Up @@ -958,7 +958,7 @@ $query = $authorsTable
This function will not load any columns from the specified associations into the
result set.

<!-- end-filtering -->
<!-- #endregion filtering -->

## Changing Fetching Strategies

Expand Down
4 changes: 2 additions & 2 deletions docs/en/orm/table-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ You can manage event priorities in one of a few ways:

`method` Cake\\ORM\\Table::**addBehavior**(string $name, array $options = []): static

<!-- start-behaviors -->
<!-- #region behaviors -->

Behaviors provide a way to create horizontally re-usable pieces of logic
related to table classes. You may be wondering why behaviors are regular classes
Expand Down Expand Up @@ -491,7 +491,7 @@ class ArticlesTable extends Table
}
```

<!-- end-behaviors -->
<!-- #endregion behaviors -->

You can find out more about behaviors, including the behaviors provided by
CakePHP in the chapter on [Behaviors](../orm/behaviors).
Expand Down
2 changes: 1 addition & 1 deletion docs/ja/orm/behaviors.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## ビヘイビアーの利用

<!--@include: ./table-objects.md{401,446}-->
<!--@include: ./table-objects.md#behaviors-->

## コアビヘイビアー

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/orm/query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1258,11 +1258,11 @@ $query->cache(function ($q) {
あるようにテーブル間の関連をセットアップしてください。他のテーブルから関連するデータを
フェッチするためにクエリーを合成する技術を **イーガーロード** (eager load) といいます。

<!--@include: ./retrieving-data-and-resultsets.md{488,680}-->
<!--@include: ./retrieving-data-and-resultsets.md#contain-->

### 関連付くデータでフィルターする

<!--@include: ./retrieving-data-and-resultsets.md{686,858}-->
<!--@include: ./retrieving-data-and-resultsets.md#filtering-->

### Join を追加する

Expand Down
8 changes: 4 additions & 4 deletions docs/ja/orm/retrieving-data-and-resultsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ CakePHP は `find()` を使う際、デフォルトでは関連データを **
結果の中にロードしたい各関連データは 'contain' で指定するか、イーガーロード (eager load)
する必要があります。

<!-- start-contain -->
<!-- #region contain -->

イーガーロードは、ORM のレイジーロード (lazy load) 周辺に潜むパフォーマンス問題の多くを避けるのに役立ちます。
イーガーロードで生成されたクエリーは JOIN に影響を与えて、効率的なクエリーが作られるようになります。
Expand Down Expand Up @@ -678,11 +678,11 @@ $query->contain([
]);
```

<!-- end-contain -->
<!-- #endregion contain -->

### matching と joins を用いた関連データによるフィルタリング

<!-- start-filtering -->
<!-- #region filtering -->

関連データに関するクエリーでよくあるのは、指定の関連データに「マッチする (matching)」レコードを
見つけるものです。たとえば、 'Articles belongsToMany Tags' である場合、かなりの確率で、
Expand Down Expand Up @@ -856,7 +856,7 @@ $query = $authorsTable

この関数は指定した関連からいずれのカラムも結果セットへとロードしません。

<!-- end-filtering -->
<!-- #endregion filtering -->

## フェッチの戦略の変更する

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/orm/table-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array

`method` Cake\\ORM\\Table::**addBehavior**($name, array $options = [])

<!-- start-behaviors -->
<!-- #region behaviors -->

ビヘイビアーは、テーブルクラスにまたがって関連するロジックの再利用可能な部品を作成する
簡単な方法を提供します。なぜビヘイビアーが通常のクラスで、トレイトではないのか
Expand Down Expand Up @@ -444,7 +444,7 @@ class ArticlesTable extends Table
}
```

<!-- end-behaviors -->
<!-- #endregion behaviors -->

CakePHP によって提供されるビヘイビアーを含む、ビヘイビアーに関する詳細は [ビヘイビアー](../orm/behaviors)
の章をご覧ください。
Expand Down
Loading