architect-handbook

Software Architect Handbook

View on GitHub

Inheritance Mappers

A structure to organize database mappers that handle inheritance hierarchies.

Overview

When you map from an object-oriented inheritance hierarchy in memory to a relational database you have to minimize the amount of code needed to save and load the data to the database, and provide both abstract and concrete mapping behavior that allows you to save or load a superclass or a subclass.

How It Works

When to Use It

This general scheme makes sense for any inheritance-based database mapping.