It means that the “scope” of the object will the request, but it doesn’t necessarily mean that the object will be available as a top-level key of the actual
request scope. I’d have to look to see where it’s actually placed (it could be inside a struct) but if you’re trying to directly access the object in the native scope, you’re “doing it wrong”
To lay a ground rule, any time you want an instance of an object, you ask WireBox for it. WireBox is the gateway. And if you want to get the same object back every time you ask for a given request, then you set the
scope="request" like you did and then…
myObj = getInstance( 'name' );
sameAsBefore = getInstance( 'name' );
yepStillTheSame = getInstance( 'name' );
But on the next request, it will be a fresh instance.
Before hitting send, I did take a quick look at the
/coldbox/system/ioc/scopes/RequestScope.cfc and it DOES seem to just stick the object directly in the request scope using the key name
wirebox:mappingName so if it’s not there, you’re either looking for the wrong key (dump the entire request scope to look) or the annotation isn’t getting processed (WireBox caches object metadata so ensure you’ve reinitted the app) or you’re somehow bypssing WireBox when creating the object.