public function setRelationshipType(array &$options, $loadRelationships)
    {
        //if this is a relationship
        if ($this->validator->arrayGet($options, 'type') === 'relationship') {
            //get the right key based on the relationship in the model
            $options['type'] = $this->getRelationshipKey($options['field_name']);

            //if we should load the relationships, set the option
            $options['load_relationships'] = $loadRelationships && !$this->validator->arrayGet($options, 'autocomplete', false);
        }
    }