# Model in a Model Exception

**URL:** <https://forums.bitovi.com/t/model-in-a-model-exception/623>\
**Category:** CanJS\
**Created:** [April 27, 2017, 7:25am UTC](https://forums.bitovi.com/t/model-in-a-model-exception/623 "2017-04-27T07:25:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nithanaroy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/nithanaroy/32/225_2.png) [@Nithanaroy](https://forums.bitovi.com/u/Nithanaroy)\
**Post date:** [April 27, 2017, 7:25am UTC](https://forums.bitovi.com/t/model-in-a-model-exception/623/1 "2017-04-27T07:25:31Z")

</div>

I have a baseMap, `Report` which has another baseMap, `Event` as a property. `validate()` in `Report` model calls the `validate()` on `Event` model instance as well.

When calling `reportInstance.validate()` in a component, an exception that the event model instance does not have a validate method is raised.

Complete example and how to reproduce the exception are shown at [https://jsbin.com/dizacon/edit?js,output](https://jsbin.com/dizacon/edit?js,output)

---

<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:** [April 27, 2017, 8:54am UTC](https://forums.bitovi.com/t/model-in-a-model-exception/623/2 "2017-04-27T08:54:03Z")

</div>

In `EditReportVM.validate()` you are calling `var validationResult = this.report.validate();`. However, it seems as though the attribute name is rather `"reportObj": {` and not `report`… could be that.

---

<div class="post-metadata">

**Author:** ![Nithanaroy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/nithanaroy/32/225_2.png) [@Nithanaroy](https://forums.bitovi.com/u/Nithanaroy)\
**Post date:** [April 27, 2017, 3:11pm UTC](https://forums.bitovi.com/t/model-in-a-model-exception/623/3 "2017-04-27T15:11:47Z")

</div>

Oops. Thanks eben. That was just by mistake.

Then I am unable to reproduce the exception I am facing in my actual application. I created this toy example with similar interaction.
