protected function defineRelationships(NodeBuilder $builder)
    {
        $relationships = $builder->arrayNode('relationships')
            ->useAttributeAsKey('')
            ->prototype('array')
            ->children()

            ->enumNode('type')
                ->values(['one', 'many'])
                ->cannotBeEmpty()
                ->defaultValue('one')
            ->end()

            ->scalarNode('getter')
                ->cannotBeEmpty()
            ->end()

            ->booleanNode('dataAllowed')
                ->defaultFalse()
            ->end()

            ->integerNode('dataLimit')
                ->defaultValue(0)
            ->end();

        $this->defineLinks($relationships);
    }