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

One other thing, are DataUserLevels and DataNav eternal objects in the cache? If you are reinitting, make sure they are put in the cache prior to trying to inject them.


here is the snippet relative to the ocm, it’s in the main handler

//cache global data queries var DataCompany = getModel('Company').DataCompany(); var DataMall = getModel('Mall').DataMall(); var DataStates = getModel('Information').DataStates(); var DataUserLevels = getModel('Permissions').DataUserLevels(); var DataNav = getModel('Menu').DataNav(); //Place in cache indefinitely until application reinitializes. getColdBoxOCM().set('DataCompany',DataCompany,0); getColdBoxOCM().set('DataMall',DataMall,0); getColdBoxOCM().set('DataStates',DataStates,0); getColdBoxOCM().set('DataUserLevels',DataUserLevels,0); getColdBoxOCM().set('DataNav',DataNav,0);

Chris Hough