I am getting error when I am doing this
$excludedFlows = $this->FlowsPredefined->find('all',[
'conditions' => [
'category' => self::INCREASE_CUSTOMER_LOYALTY_FLOWS_CATEGORY,
'is_new' => 1,
'channel' => 'all'
]
])
->select('id')
->all();
$conditions['FlowsPredefined.id NOT IN'] = $excludedFlows;
The error is :
Impossible to generate condition with empty list of values for field (
FlowsPredefined.id)
The excludedFlows variable is not empty. I have 6 results in it. How to execute NOT IN in cakePHP ?