# \-\>contain() vs find('all',\['contain'\])

**URL:** <https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899>\
**Category:** Need Help\
**Created:** [June 4, 2020, 2:42pm UTC](https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899 "2020-06-04T14:42:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarekgol](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jarekgol](https://discourse.cakephp.org/u/jarekgol)\
**Post date:** [June 4, 2020, 2:42pm UTC](https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899/1 "2020-06-04T14:42:29Z")

</div>

Hi!  
is there a reason why I get different results set for this two methods?  
`find()->contain("SomeModel") vs find('all',['contain' => "SomeModel"])`

using version 3.1, second work better, first omit some\_model in results set.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [June 4, 2020, 4:10pm UTC](https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899/2 "2020-06-04T16:10:17Z")

</div>

Is that the entirety of your call? The two have, to my recollection, always been interchangeable for me since 3.0.

---

<div class="post-metadata">

**Author:** ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)\
**Post date:** [June 4, 2020, 5:42pm UTC](https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899/3 "2020-06-04T17:42:44Z")

</div>

3.1 is no longer supported.

In 3.8 both should work the same

---

<div class="post-metadata">

**Author:** ![6120](https://avatars.discourse-cdn.com/v4/letter/6/278dde/32.png) [@6120](https://discourse.cakephp.org/u/6120)\
**Post date:** [June 5, 2020, 9:39am UTC](https://discourse.cakephp.org/t/contain-vs-find-all-contain/7899/4 "2020-06-05T09:39:59Z")

</div>

I think it should be :  
find()-\>contain([“SomeModel”])
