Model Integration in 2.6.2

I was very excited to see the new Model Integration (Dependency Injection or DI) functionality in ColdBox 2.6.2. However, I had some troubles figuring out how to implement the DI once I was in the model. Because the model should theoretically exist outside the ColdBox Framework, I needed to actually inject a part of the framework into my service objects and beans. I had been e-mailing Luis regarding another issue so I slipped in a question on how to use the ColdBox transient object creation functionality (the getModule method) from within my Model. The answer is to use cfProperty to inject the beanFactory into object where you are going to need the ColdBox DI.


Then call get model from it: variables.beanFactory.getModel('transient")

Luis, Thanks for your help with this question!