# Extending models from a ember addon

**URL:** <https://discuss.emberjs.com/t/extending-models-from-a-ember-addon/6881>\
**Category:** Ember CLI\
**Created:** [December 10, 2014, 4:39am UTC](https://discuss.emberjs.com/t/extending-models-from-a-ember-addon/6881 "2014-12-10T04:39:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arenoir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/arenoir/32/14783_2.png) [@arenoir](https://discuss.emberjs.com/u/arenoir)\
**Post date:** [December 10, 2014, 4:39am UTC](https://discuss.emberjs.com/t/extending-models-from-a-ember-addon/6881/1 "2014-12-10T04:39:32Z")

</div>

I have broken my application in three “fp-desktop”, “fp-mobile” and “fp-common”.

The models shared between the “fp-mobile” and “fp-desktop” applications are in most cases identical. So I figured I could inherit each model from a common ember-cli addon.

Like so:

fp-common/addon/models/address.js

```
 import DS from 'ember-data';
 var attr = DS.attr;
 export default DS.Model.extend({
   lineOne: attr('string'),
   city: attr('string'),
   state: attr('string'),
   zip: attr('string'),
});

```

fp-mobile/models/address.js

```
import Address from 'fp-common/models/address';
export default Address;

```

fp-desktop/models/address.js

```
import Address from 'fp-common/models/address';
export default Address.extend({
  desktopOnlyProperty: true
});

```

It seemed to work and then I started noticing strange things.

DirtyTracking of relationships stopped working and the ember inspector shows two of every model type. Eventually the count would diverge between the two model types.

I was thinking the modules defined in the addon were namespaced but perhaps not. What am I missing?

version info:

ember-cli 0.1.4 ember: 1.10.0-beta.1+canary.31667d05 ember-data: canary
