Fix namespace support

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