The Mapper class currently keeps track of all mappers. Instead, we should extract that functionality into a MapperRegistry and keep Mapper as a base class for defining attributes to serialize to the DB.
This will make several things easier, as well. For example, in #10, I had circular dependencies due to mappers instantiating serializers which would then need to get attribute lists from Mapper. If we extract this, the serializers won't depend on Mapper to get information about other mappers, they'll both instead rely on MapperRegistry.
The
Mapper
class currently keeps track of all mappers. Instead, we should extract that functionality into aMapperRegistry
and keepMapper
as a base class for defining attributes to serialize to the DB.This will make several things easier, as well. For example, in #10, I had circular dependencies due to mappers instantiating serializers which would then need to get attribute lists from
Mapper
. If we extract this, the serializers won't depend onMapper
to get information about other mappers, they'll both instead rely onMapperRegistry
.