# Get all associated entity-attributes by patchEntity in CakePHP 3

**URL:** <https://discourse.cakephp.org/t/get-all-associated-entity-attributes-by-patchentity-in-cakephp-3/377>\
**Category:** Need Help\
**Created:** [May 23, 2016, 7:40am UTC](https://discourse.cakephp.org/t/get-all-associated-entity-attributes-by-patchentity-in-cakephp-3/377 "2016-05-23T07:40:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![logrotate](https://avatars.discourse-cdn.com/v4/letter/l/e95f7d/32.png) [@logrotate](https://discourse.cakephp.org/u/logrotate)\
**Post date:** [May 23, 2016, 7:40am UTC](https://discourse.cakephp.org/t/get-all-associated-entity-attributes-by-patchentity-in-cakephp-3/377/1 "2016-05-23T07:40:20Z")

</div>

Hello@all and sorry for my bad english. (This Text is sponsored by Google Translator ^^)  
I have the following problem.  
I have 2 tables:  
**articles** (id, title, body, article\_type\_id, created, modified)  
and  
**article\_types** (id, name).  
(In the article\_types table are already entered data)  
I also have an **ArticlesController** , an **ArticlesTable** and a **create.ctp**  
[http://pastebin.com/BZQhD8nc](http://pastebin.com/BZQhD8nc)

If I spend the data, it looks like this:  
[http://pastebin.com/cP9mgvrw](http://pastebin.com/cP9mgvrw)

As you can see in $article, is in the attribute “article\_type” only the id of the entity available.  
Now I wanted to ask if it is possible, that the name of “article\_type” is automatically assigned by patchEntity of the ArticleTypes?

---

<div class="post-metadata">

**Author:** ![ADmad](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/admad/32/20_2.png) [@ADmad](https://discourse.cakephp.org/u/ADmad)\
**Post date:** [May 23, 2016, 7:34pm UTC](https://discourse.cakephp.org/t/get-all-associated-entity-attributes-by-patchentity-in-cakephp-3/377/2 "2016-05-23T19:34:23Z")

</div>

Instead of `'article_type.id'` use input name `'article_type_id'`.
