# File lib/tapkit/access/relationship.rb, line 17
                def initialize( list = {}, entity = nil )
                        @entity        = entity
                        @name          = list['name']
                        @destination   = list['destination']
                        @to_many       = list['to_many']       || false
                        @mandatory     = list['mandatory']     || false
                        @delete_rule   = list['delete_rule']   || 'nullify'
                        @own           = list['own']           || false
                        @propagate     = list['propagate']     || false
                        @join_semantic = list['join_semantic'] || 'inner'

                        @joins                  = []
                        @source_attributes      = []
                        @destination_attributes = []

                        case @delete_rule
                        when 'nullify' then @delete_rule = DELETE_RULE_NULLIFY
                        when 'cascade' then @delete_rule = DELETE_RULE_CASCADE
                        when 'deny'    then @delete_rule = DELETE_RULE_DENY
                        end

                        case @join_semantic
                        when 'inner'       then @join_semantic = INNER_JOIN
                        when 'full_outer'  then @join_semantic = FULL_OUTER_JOIN
                        when 'left_outer'  then @join_semantic = LEFT_OUTER_JOIN
                        when 'right_outer' then @join_semantic = RIGHT_OUTER_JOIN
                        end

                        if entity then
                                @destination_entity = entity.model.model_group.entity @destination
                        end

                        list['joins'] ||= []
                        list['joins'].each do |join|
                                source      = @entity.attribute join['source']
                                destination = @destination_entity.attribute join['destination']
                                @source_attributes << source
                                @destination_attributes << destination
                                add Join.new(source, destination)
                        end

                        if (list.empty? == false) and entity then
                                validate_required_attributes
                        end
                end