fix sku variant values association on variants table
CI / testsuite (mysql, 8.4, ) (push) Waiting to run Details
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Waiting to run Details
CI / Coding Standard & Static Analysis (push) Waiting to run Details
CI / testsuite (mysql, 8.2, ) (push) Has been cancelled Details

git st
This commit is contained in:
Brandon Shipley 2025-10-07 01:16:13 -07:00
parent e9ba1845ba
commit 44130c0cd2
Signed by: bmfs
GPG Key ID: 14E38571D8BB0DE4
2 changed files with 6 additions and 4 deletions

View File

@ -62,9 +62,11 @@ class ProductVariantsTable extends Table
'joinType' => 'INNER',
]);
$this->hasMany('ProductCategoryVariantOptions', [
'className' => 'CakeProducts.Products',
'foreignKey' => 'product_category_variant_id',
$this->hasMany('ProductSkuVariantValues', [
'className' => 'CakeProducts.ProductSkuVariantValues',
'foreignKey' => 'product_variant_id',
'dependent' => true,
'cascadeCallbacks' => true,
]);
}

View File

@ -65,7 +65,7 @@ class ProductVariantsTableTest extends TestCase
$expectedAssociations = [
'Products',
'ProductCategoryVariants',
'ProductCategoryVariantOptions',
'ProductSkuVariantValues',
];
$associations = $this->ProductVariants->associations();