# Contacts Addressbook Example not retrieving relations

**URL:** https://community.dreamfactory.com/t/contacts-addressbook-example-not-retrieving-relations/3954
**Category:** Code Examples
**Created:** [July 19, 2017, 6:50pm UTC](https://community.dreamfactory.com/t/contacts-addressbook-example-not-retrieving-relations/3954 "2017-07-19T18:50:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chris8374](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@chris8374](https://community.dreamfactory.com/u/chris8374)
#### Post date: [July 19, 2017, 6:50pm UTC](https://community.dreamfactory.com/t/contacts-addressbook-example-not-retrieving-relations/3954/1 "2017-07-19T18:50:08Z")

</div>

Hello, I have a big problem with the current address book example on df 2.7.0.1. The app is running fine, but I can’t retrieve the relations from a contact to contact info etc.

When I do the GET /api/v2/db/\_table/contact/1?related=contact\_infos\_by\_contact\_id,contact\_groups\_by\_contact\_group\_relationship described in [https://wiki.dreamfactory.com/DreamFactory/Features/Database/Related\_Data](https://wiki.dreamfactory.com/DreamFactory/Features/Database/Related_Data) via the API DOCs page I never get any of the relations.

This should be the answer:  
{  
“record”: [  
{  
“id”: 1,  
“first\_name”: “Jon”,  
“last\_name”: “Yang”,  
“display\_name”: “Jon Yang”,  
…  
“reports\_to”: null,  
“contact\_infos\_by\_contact\_id”: [  
{  
“id”: 1,  
“contact\_id”: 1,  
“info\_type”: “home”,  
“phone”: “500 555-0162”,  
“email”: "jon24@Home.com",  
“address”: “3761 N. 14th St”,  
“city”: “MEDINA”,  
“state”: “ND”,  
“zip”: “58467”,  
“country”: “USA”  
},  
{  
“id”: 2,  
“contact\_id”: 1,  
“info\_type”: “work”,  
“phone”: “500 555-0110”,  
“email”: "jon24@Work.com",  
“address”: “2243 W St.”,  
“city”: “MEDINA”,  
“state”: “ND”,  
“zip”: “58467”,  
“country”: “USA”  
}  
],  
“contact\_group\_relationships\_by\_contact\_id”: [  
{  
“id”: 1,  
“contact\_id”: 1,  
“contact\_group\_id”: 7  
}  
],  
“contact\_groups\_by\_contact\_group\_relationship”: [  
{  
“id”: 7,  
“name”: “Mid West”  
}  
]  
}  
]  
}

This is what I get:  
{  
“id”: 1,  
“first\_name”: “Jon”,  
“last\_name”: “Yang”,  
“image\_url”: “”,  
“twitter”: “@jon24”,  
“skype”: “jon24”,  
“notes”: “”  
}

When I take a look into the sql tables, all looking fine. There are 3 entries in the contact\_info table related to entry #1.

What is wrong with the address book example app?

Kind regards, Chris
