Does wirebox expose any metadata about an object such as name, mapped named, location etc?
I’ve had a look but not found anything obvious.
I could use getMetaData, but I’ve heard that it is expensive.
Does wirebox expose any metadata about an object such as name, mapped named, location etc?
I’ve had a look but not found anything obvious.
I could use getMetaData, but I’ve heard that it is expensive.
Neil, where are you trying to access it from?
Wirebox’s stored mapping for the object (system/ioc/config/Mapping.cfc) contains a method getObjectMetadata() perhaps this should return the information you are after.
Hi Phil.
I’m trying to get it from the object itself.
For example if a create an instance of an object with wirebox, populate it, and then send it as an argument into a method, the receiving method needs to know what name/type of object it is.
I’m creating the object like this:
var oMyObject = wirebox.getInstance(“MyObject”);
and would like to be able to pass it into a method and do this:
arguments.oMyObject.getTheObjectName();
There’s lots of ways I could do it, like setting a property on the object itself, but I was wondering if I could access any wirebox metadata for the object.
Is there any way I can access the Mapping.cfc info from the object?
Or am I over thinking this!
You have full access to it. Get te binder from wirebox then the mapping you want.