# findMany don't work

**URL:** <https://discuss.emberjs.com/t/findmany-dont-work/6243>\
**Category:** Ember Data\
**Created:** [September 10, 2014, 8:20am UTC](https://discuss.emberjs.com/t/findmany-dont-work/6243 "2014-09-10T08:20:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alveslobo\_michael](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alveslobo_michael/32/9522_2.png) [@alveslobo\_michael](https://discuss.emberjs.com/u/alveslobo_michael)\
**Post date:** [September 10, 2014, 8:20am UTC](https://discuss.emberjs.com/t/findmany-dont-work/6243/1 "2014-09-10T08:20:08Z")

</div>

Hi ,

I 'm using ember-data-1beta9. I use it with rails api backend. I don’t understand relationships… I arrive to manage a model like “post” but not an embeed model.

_ **my bakend** _ in url: /posts/1/

> {

> ```
> posts:
> 
> ```

> ```
> {
> id:"1",
> 
> ```

> ```
> name: "post1",   
> 
> ```

> ```
> apps:[1]  
> 
> ```

> ```
> } }
> 
> ```

i try to display comments but it don’t work:

_ **router** _

> @resource ‘posts’

> @resource ‘post’, path: ‘/posts/:post\_id’, →

> ```
> @route 'edit'
> 
> ```

> ```
> @resource 'apps'
> 
> ```

> ```
> @resource 'app', path: 'apps/:apps_id', ->
> 
> ```

> ```
> @route 'edit'
> 
> ```

> ```
> @route 'new'
> 
> ```

_ **routes** _

> Appli.AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, model: →

> ```
> @store.findMany('app') )
> 
> ```

_ **models** _

> Appli.App = DS.Model.extend(

> name: DS.attr(“string”)

> post: DS.belongsTo(‘post’) )
> 
> Appli.Post = DS.Model.extend(

> name: DS.attr(“string”)

> apps: DS.hasMany(‘app’) )

The CRUD for post model work but if i try to watch apps , i’ve this error: “Error while processing route: apps” “factory is undefined”

Thks

---

<div class="post-metadata">

**Author:** ![alveslobo\_michael](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alveslobo_michael/32/9522_2.png) [@alveslobo\_michael](https://discuss.emberjs.com/u/alveslobo_michael)\
**Post date:** [September 10, 2014, 10:20am UTC](https://discuss.emberjs.com/t/findmany-dont-work/6243/2 "2014-09-10T10:20:25Z")

</div>

UPDATE I found … no needs “findMany”

I’ve just change my my “app” model.

> apps: DS.hasMany(‘app’,async: true)

Now it work …
