fix sku variant values association on variants table
git st
This commit is contained in:
parent
e9ba1845ba
commit
44130c0cd2
|
@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class ProductVariantsTableTest extends TestCase
|
|||
$expectedAssociations = [
|
||||
'Products',
|
||||
'ProductCategoryVariants',
|
||||
'ProductCategoryVariantOptions',
|
||||
'ProductSkuVariantValues',
|
||||
];
|
||||
$associations = $this->ProductVariants->associations();
|
||||
|
||||
|
|
Loading…
Reference in New Issue