added generic db-class-to-allocate to determine dynamically what class
should be instance of. Useful for storing the extension of several subclasses
in a single database table (so called ORM "flat mapping").