我有以下表格:
Products
- id
- name
- description
- catalog_group_id
CatalogProducts
- id
- image_path
- group_id
ProductSizes
- id
- size_group_id
- size
然后在Products我有方法product_sizes,它通过CatalogProducts与ProductSize有关联。但是当执行此操作时,会出现一个表情符号数组product_sizes。
public function product_sizes()
{
return $this->hasManyThrough('Core\Entity\ProductSizes', 'Core\Entity\CatalogProducts', 'group_id', 'size_group_id');
}
'product_sizes' =>
array (size=0)
empty