Fix namespace support

The constant TM_CLASS was not containing the fully qualified classname.
Needed for DatabaseMap to work correctly