add the contain for product skus on products
This commit is contained in:
parent
4356dcd800
commit
9d9c32f0b9
|
@ -76,12 +76,12 @@ class ProductsTable extends Table
|
||||||
'cascadeCallbacks' => true,
|
'cascadeCallbacks' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// $this->hasMany('ProductSkus', [
|
$this->hasMany('ProductSkus', [
|
||||||
// 'foreignKey' => 'product_id',
|
'foreignKey' => 'product_id',
|
||||||
// 'className' => 'CakeProducts.ProductSkus',
|
'className' => 'CakeProducts.ProductSkus',
|
||||||
// 'dependent' => true,
|
'dependent' => true,
|
||||||
// 'cascadeCallbacks' => true,
|
'cascadeCallbacks' => true,
|
||||||
// ]);
|
]);
|
||||||
|
|
||||||
$this->getSchema()->setColumnType('product_type_id', EnumType::from(ProductProductTypeId::class));
|
$this->getSchema()->setColumnType('product_type_id', EnumType::from(ProductProductTypeId::class));
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ class ProductsTableTest extends TestCase
|
||||||
'ProductCategories',
|
'ProductCategories',
|
||||||
'ProductAttributes',
|
'ProductAttributes',
|
||||||
'ProductCategoryVariants',
|
'ProductCategoryVariants',
|
||||||
|
'ProductSkus',
|
||||||
];
|
];
|
||||||
$associations = $this->Products->associations();
|
$associations = $this->Products->associations();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue