protected function getTableMapping($table)
    {
        if (array_key_exists($table, $this->mappings)) {
            return $this->mappings[$table];
        }

        $mapping = $this->retrieveMapping($table);

        if (empty($mapping)) {
            throw new \UnderflowException("Table with name {$table} not found.");
        }

        $this->mappings[$table] = $mapping;

        return $mapping;
    }