"Shared class \"user\" has no method handling POST /1/collections"
<p>I'm trying to create relationships in StrongLoop between two models: users &amp; collections.</p>

<p>No matter what i do, i just can't create a collection from the path <code>POST: /users/1/collection/</code>. Always the same error appears:</p>

<pre><code>{
  "errors": [
    {
      "status": 404,
      "source": "",
      "title": "Error",
      "code": "",
      "detail": "Shared class \"user\" has no method handling POST /1/collections"
    }
  ]
}
</code></pre>

<p>So.. Searching ALOT i finally find this <code>github issue</code> showing how to "fix". And i finally did the necessary changes:</p>

<pre><code>collection.json:

{
  "name": "collection",
  "base": "PersistedModel",
  "strict": false,
  "idInjection": false,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    ...
  },
  "validations": [],
  "relations": {
    "user": {
      "type": "belongsTo",
      "model": "user",
      "foreignKey": "id"
    }
  },
  "acls": [
    {
       "accessType": "EXECUTE",
       "principalType": "ROLE",
       "principalId": "$everyone",
       "permission": "ALLOW",
       "property": "__create__collections"
     }
  ],
  "methods": {}
}
</code></pre>

<p>user.json:</p>

<pre><code>{
  "name": "user",
  "base": "PersistedModel",
  "strict": false,
  "idInjection": false,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    ...
  },
  "validations": [],
  "relations": {
    "collections": {
      "type": "hasMany",
      "model": "collection",
      "foreignKey": "id"
    }
  },
  "acls": [{
   "principalType": "ROLE",
   "principalId": "$everyone",
   "permission": "ALLOW",
   "property": "count"
  },
  {
   "principalType": "ROLE",
   "principalId": "$everyone",
   "permission": "ALLOW",
   "property": "__create__collections"
  },
  {
   "principalType": "ROLE",
   "principalId": "$everyone",
   "permission": "ALLOW",
   "property": "__count__collections"
  }],
  "methods": {}
}
</code></pre>

<p>But... didn't work, i still see the same error.</p>

<p>Thanks in advance!</p>