return allRelations(model).reduce(function (result, relation) {
    // nested relations are specified by dot notated strings
    // if a relation has a dot in it, it is nested, and therefor
    // cannot be a toOne relation. ignore it.
    if (relation.indexOf('.') !== -1) {