via (DataMapper::Associations::ManyToMany::Relationship)

    # File lib/dm-core/associations/many_to_many.rb, line 75
            def via
              return @via if defined?(@via)

              if options[:via].kind_of?(Associations::Relationship)
                return @via = options[:via]
              end

              repository_name = through.relative_target_repository_name
              through_model   = through.target_model
              relationships   = through_model.relationships(repository_name)
              singular_name   = name.to_s.singularize.to_sym

              @via = relationships[options[:via]] ||
                relationships[name]               ||
                relationships[singular_name]

              @via ||= if anonymous_through_model?
                DataMapper.repository(repository_name) do
                  through_model.belongs_to(singular_name, target_model, many_to_one_options)
                end
              else
                raise UnknownRelationshipError, "No relationships named #{name} or #{singular_name} in #{through_model}"
              end

              @via.child_key

              @via
            end