# Problems with associated results

**URL:** <https://discourse.cakephp.org/t/problems-with-associated-results/3554>\
**Category:** Uncategorized\
**Created:** [November 22, 2017, 7:08pm UTC](https://discourse.cakephp.org/t/problems-with-associated-results/3554 "2017-11-22T19:08:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grupoviabr](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@grupoviabr](https://discourse.cakephp.org/u/grupoviabr)\
**Post date:** [November 22, 2017, 7:08pm UTC](https://discourse.cakephp.org/t/problems-with-associated-results/3554/1 "2017-11-22T19:08:17Z")

</div>

hello guys, check out this problem,  
when I use it contain to bring the ex associates:

$this-\>Categories-\>find()-\>contain([‘Posts’ =\> function ($q) {  
return $q-\>limit(5);  
}])

Let’s say I have 15 more posts I want to have only 5 posts in each category.

The cake only has 5 records in the first category and in the second category there are no records.

Would this be a mistake in the cake or?
