From ca4c60a3284ad77a8cc6fe386523fa7982ed069f Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Thu, 20 Apr 2017 11:59:57 -0700 Subject: [PATCH] lb relation (Post belongs to Author) --- loopback-blog/common/models/post.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/loopback-blog/common/models/post.json b/loopback-blog/common/models/post.json index e939910..31bba9a 100644 --- a/loopback-blog/common/models/post.json +++ b/loopback-blog/common/models/post.json @@ -17,7 +17,13 @@ } }, "validations": [], - "relations": {}, + "relations": { + "author": { + "type": "belongsTo", + "model": "Author", + "foreignKey": "" + } + }, "acls": [], "methods": {} }