show image on view product photos page, setEntityClass defaulting to all plugin entities
This commit is contained in:
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Model\Table;
|
||||
|
||||
use Cake\Core\Configure;
|
||||
use Cake\Database\Type\EnumType;
|
||||
use Cake\Datasource\EntityInterface;
|
||||
use Cake\Datasource\ResultSetInterface;
|
||||
@@ -51,6 +52,10 @@ class ProductsTable extends Table
|
||||
$this->setDisplayField('name');
|
||||
$this->setPrimaryKey('id');
|
||||
|
||||
$this->setEntityClass(
|
||||
Configure::read('CakeProducts.Products.entity', 'CakeProducts\Model\Entity\Product')
|
||||
);
|
||||
|
||||
$this->belongsTo('ProductCategories', [
|
||||
'foreignKey' => 'product_category_id',
|
||||
'bindingKey' => 'internal_id',
|
||||
|
||||
Reference in New Issue
Block a user