_createParentRecordIfRequired (props, opts) {
    const tasks = []
    const relations = []

    utils.forEachRelation(this, opts, (def, optsCopy) => {
      if (!def.isRequiresParentId() || !def.getLocalField(props)) {
        return
      }

      optsCopy.raw = false
      relations.push(def)
      tasks.push(def.createParentRecord(props, optsCopy))
    })

    return utils.Promise.all(tasks).then(records => {
      return relations.reduce((map, relation, index) => {
        relation.setLocalField(map, records[index])
        return map
      }, {})
    })
  }
Creates parent record for relation types like BelongsTo or HasMany with localKeys
in order to satisfy foreignKey dependency (so called child records).
@param {object} props See {@link Mapper#create}.
@param {object} opts See {@link Mapper#create}.
@returns {Object} cached parent records map
@see Mapper#create
@since 3.0.0