Model Relationships: typo in example code
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
調査の方向性
Read the model relationships section linked in the issue and compare its examples with the EE6 relationship definition described here. The issue reports that adding the ee: prefix to the model name fixes an unknown-model error, but asks for confirmation that this is a documentation bug. Done means verifying the behavior and correcting the examples if confirmed.
索引モデルが issue の本文から書いたものです。
説明
Description of the problem
In the description of model relationships there are several examples of code used to define relationships between models. The examples all have the same basic core that looks something like this:
protected static $_relationships = array(
'Author' => array(
'model' => 'Member',
'type' => 'BelongsTo'
)
);
For EE6 at least this construct appears to be incorrect, as using this type of construct omits the ee: prefix and (at least in this authors test system) without this prefix EE will reject the relationship throwing an error of the form:
Unknown model "Member". Used in model "myAddon:Model" for a relationship called "Reln".
Adding the ee: prefix eliminates the error and leads to normal operation.
protected static $_relationships = array(
'Author' => array(
'model' => 'ee:Member',
'type' => 'BelongsTo'
)
);
However it may be that this is an issue unique to my system, so I would value observations about whether or not this is indeed a documentation bug.
If it is indeed a bug I'm happy to amend the documentation as required.
Additional context
The ee: prefix is used in relationship definitions within the EE code (e.g. in Addons\Forum\Model\Administrator.php).
- 主要言語
- CSS
- スター
- 22
- フォーク
- 79
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ExpressionEngine/ExpressionEngine-User-Guide のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 46/100
ExpressionEngine/ExpressionEngine-User-Guide の issue をすべて見る
似ている issue
-
Cleanup Setup対応中かも @AlexanderKaran が今日担当しました。 オープンdocumentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
e18e/framework-tracker#769 ·
メンテナーはふだん 1 日以内に返信
-
bug v2
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
modelcontextprotocol/servers#5483 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#928 ·
メンテナーはふだん 3 日以内に返信
-
agentic-workflows automation repo-assist
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
shanselman/winget-tui#483 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
griptape-ai/griptape-nodes-library-elevenlabs#30 ·
メンテナーはふだん 1 日以内に返信