add the contain for product skus on products
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user