cakephp / orm

[READ-ONLY] A flexible, lightweight and powerful Object-Relational Mapper for PHP, implemented using the DataMapper pattern. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to a member function clearContain() on null

kentosama opened this issue · comments

Hello, i want override contain with second parameter on "true" on my query, but CakePHP return fatal error : Call to a member function clearContain() on null

Here my query :

$feeds = $this->Feeds->find()
                ->contain([
                    'Users.Profiles.Avatars',
                    'Questions.Categories',
                    'Statuses',
                    'Cities',
                        ], true)
                ->where(['Users.username' => $this->request->data['username']])
                ->order(['Feeds.created' => 'DESC']);

I tested with some query and CakePHP return same error. What is the problem ?

Thank you !

commented

This issue was moved to cakephp/cakephp#7580