Cfmongodb is awesome. It's working well in Wirebox as well. We have this weird issue though when calling functions in a CFC that behaves differently than on a CFM page.
Example (works in CFM):
coll = mongoService.getDBCollection( "announcements" );
announcements =coll.query().$gt("expiredate", dateconvert("local2utc",now())).find( limit=1, sort={"ts"=-1} );
The same code above when in a CFC (assume mongoService is a injected configured mongo instance) doesn't work and it will throw an error:
coll is undefined.
This is where it gets really weird. If we do this.. it works.
coll = mongoService.getDBCollection( "announcements" );
coll; // or just a writedump(coll);
announcements =coll.query().$gt("expiredate", dateconvert("local2utc",now())).find( limit=1, sort={"ts"=-1} );
Scratches head. We have tried this 20 different ways to Sunday (w/o Wirebox, instantiate from the function) and it behaves the same. So Wirebox doesn't affect the result. Any ideas on why this variable needs a touch? Is it lonely?? :)