After I do this, sure I have the categories data in categories var. But the contained relations on $articles seem to be gone now, after performing the extract operation. Before it did not work like that in cakephp 3. I assume something has changed why this is not working anymore as intended?
For some reason the this->paginate options do not work after having used extract on the resultset. Where normally the this paginate will use those options…
to use extract you need to do all() first otherwise you have deprecated warning, but the limit does work on the paginate options, it is just the contain that doesnt work…
ok Thanks. Had the problem where first select the articles, then after use the same result to extract categories with count. But then the original data was gone…