hasOne(Target, foreignKey, foreignKeyTarget) {
      return this._relation('hasOne', Target, {
        foreignKey,
        foreignKeyTarget
      }).init(this);
    }
This relation specifies that this table has exactly one of another type of object, specified by a foreign key in
the other table.

@example
const Record = bookshelf.model('Record', {
  tableName: 'health_records'
})

const Patient = bookshelf.model('Patient', {
  tableName: 'patients',
  record() {
    return this.hasOne('Record')
  }
})

// select * from `health_records` where `patient_id` = 1
new Patient({id: 1}).related('record').fetch().then(function(model) {
  // ...
})

// Alternatively, if you don't need the relation loaded on the patient's relations hash:
new Patient({id: 1}).record().fetch().then(function(model) {
  // ...
})

@method Model#hasOne
@param {Model|string} Target
  Constructor of {@link Model} targeted by join. Can be a string specifying a previously registered model with
  {@link Bookshelf#model}.
@param {string} [foreignKey]
  Foreign key in the `Target` model. By default the foreign key is assumed to be the singular form of this
  model's {@link Model#tableName tableName} followed by `_id` / `_{{{@link Model#idAttribute idAttribute}}}`.
@param {string} [foreignKeyTarget]
  Column in this model's table which `foreignKey` references, if other than this model's `id` /
  `{@link Model#idAttribute idAttribute}`.
@returns {Model}
  The return value will always be a model, even if the relation doesn't exist, but in that case the relation will
  be `null` when {@link Model#serialize serializing} the model.