# Async loading. Relations' initialization

**URL:** https://discuss.emberjs.com/t/async-loading-relations-initialization/7422
**Category:** Ember Data
**Created:** [February 27, 2015, 8:30am UTC](https://discuss.emberjs.com/t/async-loading-relations-initialization/7422 "2015-02-27T08:30:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![novtor](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@novtor](https://discuss.emberjs.com/u/novtor)
#### Post date: [February 27, 2015, 8:30am UTC](https://discuss.emberjs.com/t/async-loading-relations-initialization/7422/1 "2015-02-27T08:30:48Z")

</div>

Hi everybody,

I have a général question about async feature. Let’s say I have a model like (just relationships are shown):

model A

hasMany B, async

hasMany C, async

model B

hasMany C, async

model C

The relationship A → C is as follows: it includes all the C of each B related but can have some extra C that are not in any B related.

And let’s say wa have loaded an A with all the B related. Now the user wants to view C related to a B or to the A. So to load C asynchronousely I have two choices:

1. iterate throuh B and load all the C of each B and then to load all the C related to A. This is not very performant but is a possible scenario of extreme asynchronosity: perhaps the user would like to see just C of some B.
2. load all the C related to A which will ensure that all the C related to all the B will be loaded as well.

My question is about the 2d scenario. What happens with B → C if I load A → C in afterModel (emberjs):

1. In the identity map (or session or I do not know how to call it) of ember-data.
2. With the snapshots of B → C that are actually in the route’s model.

Hope it is clear enough and thank you for your time
