0

I recently start with Strongloop framework,

I made a simple model

{
  "name": "income",
  "plural": "incomes",
  "base": "PersistedModel",
  "idInjection": true,
  "properties": {
    "description": {
      "type": "string",
      "required": true
    },
    "amount": {
      "type": "number",
      "required": true
    },
    "when": {
      "type": "date",
      "required": true
    }
  },
  "validations": [],
  "relations": {
    "user": {
      "type": "belongsTo",
      "model": "User",
      "foreignKey": ""
    }
  },
  "acls": [],
  "methods": []
}

I want make a relation with current session user and the income record. but I can't find a example for that.

rkmax
  • 17,633
  • 23
  • 91
  • 176

1 Answers1

0

You can use the current context, there is a code example at the bottom of the link, but you have to expand it:

Link

AndreF
  • 36
  • 1
  • 1