Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog helper test categories #3029

Merged
merged 20 commits into from
Jan 18, 2024

Conversation

nghiem-mb
Copy link
Contributor

No description provided.

@nghiem-mb
Copy link
Contributor Author

@ryuring
バグ確認お願いします。

@ryuring ryuring assigned nghiem-mb and unassigned ryuring Jan 16, 2024
@ryuring
Copy link
Collaborator

ryuring commented Jan 16, 2024

一旦、担当を戻しておきますね @nghiem-mb

@nghiem-mb nghiem-mb assigned ryuring and unassigned nghiem-mb Jan 17, 2024
@@ -424,6 +425,7 @@ public function test__getCategoryList()
'fields' => $fields,
'depth' => 2,
]);
// dd($result->toArray()[0]->children);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nghiem-mb 削除必要

@@ -268,6 +268,7 @@ protected function _getCategoryList(
if ($distinct) {
$query->distinct($distinct);
}
$query->matching('BlogPosts.BlogContents.Contents');
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nghiem-mb これは使い方が違う気がします。全ての条件において無理やり inner join で繋げることになり負荷が高くなるので、必要な時だけ使うように調整してください。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

はい。調整します。

@ryuring ryuring assigned nghiem-mb and unassigned ryuring Jan 17, 2024
@ryuring ryuring added the Reviewed レビュー済 label Jan 17, 2024
@nghiem-mb nghiem-mb assigned ryuring and unassigned nghiem-mb Jan 17, 2024
@@ -268,6 +268,9 @@ protected function _getCategoryList(
if ($distinct) {
$query->distinct($distinct);
}
if ($options['siteId'] !== false && !is_null($options['siteId'])) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nghiem-mb 238行目にまとめることはできませんか?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nghiem-mb 以前共有したこちらのコードを参考にお願いします。

            $query->matching('BlogPosts.BlogContents.Contents', function ($q) use ($params) {
                return $q->where(['Contents.site_id' => $params['siteId']]);
            });

@ryuring ryuring assigned nghiem-mb and unassigned ryuring Jan 17, 2024
@nghiem-mb nghiem-mb assigned ryuring and unassigned nghiem-mb Jan 18, 2024
@ryuring ryuring assigned nghiem-mb and unassigned ryuring Jan 18, 2024
@nghiem-mb nghiem-mb assigned ryuring and unassigned nghiem-mb Jan 18, 2024
@ryuring ryuring merged commit f395c3d into baserproject:dev-cake5 Jan 18, 2024
1 check passed
@nghiem-mb nghiem-mb deleted the blogHelperTest-categories branch January 19, 2024 04:00
@ryuring ryuring added this to the 5.0.8 milestone Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed レビュー済
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants