diff --git a/lib/serializer.js b/lib/serializer.js index 0e590ec..0d355c1 100644 --- a/lib/serializer.js +++ b/lib/serializer.js @@ -269,6 +269,8 @@ function parseRelations (data, relations, options) { // No `data` key should be present unless there is actual relationship data. if (relationship) { relationships[name].data = relationship + } else if (relation.type === 'belongsTo') { + relationships[name].data = null } })