Hi, When i add (Album status => 1) the paginate return Not found error, otherwise it was working fine
$qur = $this->Products->find('all');
$qur->select(['itemCount' => $qur->func()->count('distinct Products.id'), 'productPrice' => $qur->func()->sum('Products.wholesale_price'), 'Products.id', 'Products.design_no', 'Products.album_id', 'Products.catalogno', 'Products.brand', 'Products.product', 'Products.fabric', 'Products.stock', 'Products.total_products', 'Products.Image', 'Products.subcategory', 'Products.category_id', 'Products.wholesale_price', 'Products.weight', 'Products.fcolor', 'Products.fwork', 'Products.ffabric', 'Products.created']);
$qur->where(["category_id=".$catId[0]['id']." $columnQur"])->andWhere(['Albums.status' => '1'])->contain(['Albums'])->group('album_id')->order(['Albums.id' => 'desc'])->autoFields(true);
$albums = $this->paginate($qur);
Thanks