public function properties(array $propertyAliasMap)
    {
        $this->verifyClassDefined(__METHOD__);
        $this->verifyMapperDefined(__METHOD__);

        $propertyColumnMap = $this->definition->getPropertyColumnMap();
        $relations         = $this->definition->getPropertyRelationMap();
        $toPhpConverters   = $this->definition->getDbToPhpPropertyConverterMap();
        $table             = $this->definition->getTable();
        $emptyFunction     = function () {
        };

        foreach ($propertyAliasMap as $property => $alias) {
            if (is_int($property)) {
                $property = $alias;
            }

            $this->validatePropertyMapped($property);

            if (isset($propertyColumnMap[$property])) {
                $dbToPhpConverter = isset($toPhpConverters[$property])
                    ? $toPhpConverters[$property]
                    : function ($i) {
                        return $i;
                    };


                if (is_string($alias)) {
                    $columnDefiner = $this->readDefinition
                        ->property($alias)
                        ->mappedVia($emptyFunction, $dbToPhpConverter);
                } else {
                    $columnDefiner = $this->readDefinition
                        ->accessor($emptyFunction, $alias);
                }

                $columnDefiner
                    ->to($propertyColumnMap[$property])
                    ->asType($table->findColumn($propertyColumnMap[$property])->getType());
            } else {
                $relation = $relations[$property];

                if (is_string($alias)) {
                    $relationDefiner = $this->readDefinition->relation($alias);
                } else {
                    $relationDefiner = $this->readDefinition->accessorRelation($emptyFunction, $alias);
                }

                $relationDefiner->asCustom($relation);
                $this->loadRelationColumns($relation);
            }
        }
    }