Inject a model in another model?

I’m having an issue where I am trying to access a model inside of another model. In my team model I’m trying to use my email model.

My team model looks like

…some code here

if ( neq “error”) emailService.emailUnfreeze(;;

my wirebox.cfc



I can access the email model just fine from a handler so I know it is wired up. Any ideas or suggestions?


Hy there Jonathan,

- If you only want to acces your email, why don you save it in the RC
(recuest contest) ?
- or you can create a plugin (CFC) where you can request for special
information, from within any model or view

I think there is not point in coldbox to try and extend a model within
a model.

Felipe Serrano

Technically you are not extending a model with a model so be careful about that misconception.

To the original poster, you don’t say if you get an error or not?

Also if you have something in your model folder, you do not need to wire it up like that. You can remove that binding and it will still work. As long as you place the singleton annotation / attribute in your component it will still work.