# "get" using define plugin not fired when map is extended

**URL:** <https://forums.bitovi.com/t/get-using-define-plugin-not-fired-when-map-is-extended/441>\
**Category:** CanJS\
**Created:** [October 13, 2016, 4:09am UTC](https://forums.bitovi.com/t/get-using-define-plugin-not-fired-when-map-is-extended/441 "2016-10-13T04:09:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eben\_roux](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/eben_roux/32/380_2.png) [@eben\_roux](https://forums.bitovi.com/u/eben_roux)\
**Post date:** [October 13, 2016, 4:09am UTC](https://forums.bitovi.com/t/get-using-define-plugin-not-fired-when-map-is-extended/441/1 "2016-10-13T04:09:03Z")

</div>

I have a `can.Map` hierarchy define as follows:

```auto
var Model = can.Map.extend({
  define: {
    value: {
      value: false
    },
    
    theValue: {
      get: function(){
        return this.attr('value');
      }
    }
  }
})

var ExtendedModel = Model.extend({
  define: {
    anotherValue: {
      value: true
    },
    
    extendedTheValue: {
      get: function(){
        return this.attr('value');
      }
    }
  },
  
  toggleValue: function(){
    this.attr('value', !this.attr('value'));
  }
})

```

However, the `theValue` method is never called but the `extendedTheValue` method _is_ called. Seems as though the `theValue` _get_ is not inherited. I did read something about the `define` inheritance somewhere but I do not know if this is related.

Example in [this jsbin](http://jsbin.com/yixajox/edit?html,js,output).

Any way to get this working as expected?

---

<div class="post-metadata">

**Author:** ![DylanRoss](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/dylanross/32/71_2.png) [@DylanRoss](https://forums.bitovi.com/u/DylanRoss)\
**Post date:** [October 13, 2016, 4:30am UTC](https://forums.bitovi.com/t/get-using-define-plugin-not-fired-when-map-is-extended/441/2 "2016-10-13T04:30:16Z")

</div>

I think [canjs#1322](https://github.com/canjs/canjs/issues/1322) was the original issue that led to the development of define inheritance. I’m not sure where the current status is, but you can probably follow the links to the other issues to find out. [can-map-define#17](https://github.com/canjs/can-map-define/issues/17) is recent and may be related.

The old trick people used to do involves basically merging the two define blocks yourself, so you can probably do something like this for now:

```auto
var ExtendedModel = BaseModel.extend({
  define: can.extend({
    foo: {
      value: true
    }
  }, BaseModel.prototype.define)
})

```
