Skip to content

Instantly share code, notes, and snippets.

@sebastianhaas
Created October 1, 2015 21:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastianhaas/0e533dac5ace355ebae3 to your computer and use it in GitHub Desktop.
Save sebastianhaas/0e533dac5ace355ebae3 to your computer and use it in GitHub Desktop.
LoopBack User Friendship
{
"name": "user",
"plural": "users",
"base": "User",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {},
"validations": [],
"relations": {
"friends": {
"type": "hasManyThrough",
"model": "user",
"foreignKey": "friendsId",
"through": "Friendship",
"keyThrough": "???"
}
},
"acls": [],
"methods": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment