ThingEngineer/PHP-MySQLi-Database-Class

Relation properties doesn't work with twig?

dzpt opened this issue · 0 comments

dzpt commented

The product object has the relation to category object.

    protected $relations = [
            'category' => ['hasOne', '\Module\Shop\Model\Category', 'cat_id'],
    ];

However if i print {{ product.category.name }} , it will print product , not the category object, due to the __call method of Mysqlidb.

So twig can't call to lazy load properties ?