tracker issue : CF-3594771

select a category, or use search below
(searches all categories and all time range)
Title:

getObjectMetadata()

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/EnhancementRequired

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 07/15/2013

Components: Language

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 1

See: http://cfmlblog.adamcameron.me/2013/07/getobjectmetadata.html

Bottom line (extracted from the above article):
[It would be good] to have a getObjectMetadata(), which simply does what it claims it does: gets the metadata of the actual object passed to it, rather than the CFC it was an instance of.

That in itself is not so interesting, but I'd also envisage the metadata to be writable. For example, if I push another function into the metadata, this is reflected in the object. We can already push functions into objects - as demonstrated above - but there's other stuff we can't do. How about pushing functions into the object so that it fulfills an interface contract, and then also setting the object's implements metadata to tell it it now implements that interface; so it can then be used in situations in which we need that interface. Or - and god knows the ramifications of this - changing the extends metadata of the object so it extends some different parent component?

TBH, the most useful thing would be for it to return the metadata of the actual object, not the component the object is an instance of. But I've had situations in which being able to make an existing object fulfill an interface contract would have been useful. But then again I bring this upon  myself because I use interfaces. Maybe I just shouldn't.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3594771

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This is a feature that I would find useful, especially pushing functions into an object's metadata.
Vote by External U.
14974 | July 15, 2013 10:29:13 AM GMT
You do make a good case for it in the blog post. We will come back to this later if we have time in this release.
Comment by Rupesh K.
14973 | September 05, 2013 02:19:24 AM GMT