RE: [coldbox:13643] Re: model inject model dependency and ocm

Yeah, I’m not sure. I’ll admit, I’m having troubles following the flow of execution.

Can you show your method in menu that is calling the method in permissions that is erroring?

When you say “If I remove the call to the injected OCM Instance variable and call the method directly it works.” do you mean when you remove the reference to instance.DataUserLevels in the Permissions component?

Also, I know you are injecting your properties into “instance”, but it’s rather confusing to have methods and instance vars with the same name. Did you try injecting them with a different name just to see if that changes anything.

Here are the full files:

Menu.cfc (62.5 KB)

Permissions.cfc (3.78 KB)