Fix Issue 3093 - Add better documentation for Object.factory and add an example.
Merge pull request #774 from AndrejMitrovic/Fix3093

Issue 3093 - Add better documentation for Object.factory and add an example