# Cake "ignores" inserting associated data

**URL:** <https://discourse.cakephp.org/t/cake-ignores-inserting-associated-data/5752>\
**Category:** Need Help\
**Created:** [March 7, 2019, 10:51am UTC](https://discourse.cakephp.org/t/cake-ignores-inserting-associated-data/5752 "2019-03-07T10:51:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [March 7, 2019, 11:37am UTC](https://discourse.cakephp.org/t/cake-ignores-inserting-associated-data/5752/3 "2019-03-07T11:37:22Z")

</div>

> [@Graziel](#):
>
> $user = $this-\>Users-\>findById(1)-\>contain([‘UsersDetails’])-\>first();  
> dd($user);

Doing this results in the error:

> The UsersDetails association is not defined on Users.

Last time I [encountered](https://discourse.cakephp.org/t/the-usersdetails-association-is-not-defined-on-users/5604) this issue I forgot to load the model (which I did this time).

---

_[View the full topic](https://discourse.cakephp.org/t/cake-ignores-inserting-associated-data/5752)._
