private function hydrateProperties(
        array $properties,
        MetadataDataObjectJson $metadata,
        MetaDataCollection $mainCollection
    ) {
        $specialProperties = array();

        foreach ($properties as $propName => $propertie) {
            if (false === ($propertie instanceof \JSONSchema\Structure\Property)) {
                throw new \Exception('$propertie is not an instance of Property');
            }
            if (in_array($propertie->getType(), array('object', 'array')) === true) {
                $specialProperties[$propName] = $propertie;
                continue;
            }

            $column = new MetaDataColumn();
            $column->setNullable(!$propertie->getRequired());
            $column->setName($propertie->getName());
            $column->setType($propertie->getType());

            $metadata->appendColumn($column);
        }

        if ($specialProperties !== array()) {
            foreach ($specialProperties as $prop) {
                $metadata->appendRelation(
                    $this->hydrateMetaDataRelationColumn(
                        $prop->getName(),
                        $prop->getProperties(),
                        $metadata,
                        $mainCollection
                    )
                );
            }
        }

        return $metadata;
    }