# DS.PromiseArray And Em.ArrayController should proxy meta property

**URL:** <https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059>\
**Category:** Ember Data\
**Created:** [April 27, 2014, 2:12pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059 "2014-04-27T14:12:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexspeller](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alexspeller/32/14812_2.png) [@alexspeller](https://discuss.emberjs.com/u/alexspeller)\
**Post date:** [April 27, 2014, 2:12pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059/1 "2014-04-27T14:12:57Z")

</div>

First off, I think that PromiseArray should proxy meta, so that this works:

```nohighlight
promiseArray = store.find('foo', {page: 1});

promiseArray.then(function(foos) {
 promiseArray.get('meta') // should not be null
 foos.get('meta') // works but is confusing why both don't work
});

```

I also think that Ember Data should reopen ArrayController to do the same, or it should happen in ember - not sure what the best place to do that in is, but the following should definitely work IMO:

```nohighlight
App.ApplicationRoute = Em.Route.extend({
  model: function() {
    return this.store.find('foo');
  }
});

```

```nohighlight
{{meta.someProperty}} {{! should work }}
{{content.meta.someProperty}} {{! currently works but confusing, not required for e.g. length }}

```

Happy to provide a PR if anyone agrees

---

<div class="post-metadata">

**Author:** ![danlucraft](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/danlucraft/32/14920_2.png) [@danlucraft](https://discuss.emberjs.com/u/danlucraft)\
**Post date:** [April 27, 2014, 2:16pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059/2 "2014-04-27T14:16:20Z")

</div>

I was caught by this and was very very confused as to why I couldn’t access the meta info.

---

<div class="post-metadata">

**Author:** ![JulianLeviston](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@JulianLeviston](https://discuss.emberjs.com/u/JulianLeviston)\
**Post date:** [April 27, 2014, 2:59pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059/3 "2014-04-27T14:59:24Z")

</div>

I’m just curious as to why meta becomes a reserved keyword in templates therefore, no? It’d be really good to keep the reserved keywords down IMHO. Maybe I’ve misunderstood. (Probably), so apologies in advance!

---

<div class="post-metadata">

**Author:** ![alexspeller](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alexspeller/32/14812_2.png) [@alexspeller](https://discuss.emberjs.com/u/alexspeller)\
**Post date:** [April 27, 2014, 3:12pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059/4 "2014-04-27T15:12:02Z")

</div>

No, it doesn’t become reserved. It is just proxied to the underlying content variable of ArrayControllers if it’s not defined already. So this would still work:

```auto
App.FooController = Em.ArrayController.extend({meta: 'Something else'});

```

As would using meta in templates as a name. It doesn’t affect any use case where meta is already defined or used for something else.

---

<div class="post-metadata">

**Author:** ![JulianLeviston](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@JulianLeviston](https://discuss.emberjs.com/u/JulianLeviston)\
**Post date:** [April 27, 2014, 3:58pm UTC](https://discuss.emberjs.com/t/ds-promisearray-and-em-arraycontroller-should-proxy-meta-property/5059/5 "2014-04-27T15:58:29Z")

</div>

Sweetness and light! 😄
