title: No self href in embedded HAL resource collection
body: <p>I use the <code>self</code> <code>href</code> from my HAL resources on the client side to find the right path for the CRUD operations. In single(ton) resources this is working fine (see the address resource below, the <code>_links</code> containing the <code>self</code> <code>href</code> is included in the embedded resource) but when it comes down to collections this is a different story. The <code>_links</code> of a collection are not rendered when the collection is in <code>_embedded</code>. </p>
  
  <p>Earlier I worked around this problem by reading the url form the first child. But this is not sufficient. In case the collection is empty I only have 
  an empty array with no possibility to extract the url like that. If I want to create a new item in the collection I would like that my client knows where to send data using <code>POST</code> by reading the <code>self</code> <code>href</code> from <code>_links</code>. Is it a good idea to include the <code>_links</code> to my collection like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>{
      "_links": {
          "self": {
              "href": "http://example.com/api/v1/users/1"
          }
      },
      "_embedded": {
          "contacts": {
  </code></pre>
  
  <p>Now I have access to the self href here:</p>
  
  <pre class="lang-php prettyprint-override"><code>            "_links": {
                  "self": {
                      "href": "http://example.com/api/v1/users/1/contacts"
                  }
              },
              "_embedded": {
                  "contacts": [
                      {
                          "_links": {
                              "self": {
                                  "href": "http://example.com/api/v1/users/1/contacts/2"
                              }
                          },
                          "id": "2",
                          "name": "John Smith"
                      },
                      {
                          "_links": {
                              "self": {
                                  "href": "http://example.org/api/v1/users/1/contacts/3"
                              }
                          },
                          "id": "3",
                          "name": "Jane Doe"
                      }
                  ],
              }
          },
          "address": {
              "_links": {
                  "self": {
                      "href": "http://example.com/api/v1/addresses/1"
                  }
              },
              "street": "Bakerstreet 11",
              "postal code": "123456",
              "city": "Some city",
              "country": "Some country",
          }
      },
      "id": "1",
      "name": "John Doe"
  }
  </code></pre>
  
  <h2>EDIT (one year later)</h2>
  
  <p>In the end I solved this by always adding the links of embedded resources to the parent resource. So in the example above my response object would look like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>{
      "_links": {
          "self": {
              "href": "http://example.com/api/v1/users/1"
          },
          "contacts": {
              "href": "http://example.com/api/v1/users/1/contacts"
          },
          "address": {
              "href": "http://example.com/api/v1/addresses/1"
          }
      },
      "_embedded": {
          "contacts": [
              {
                  "_links": {
                      "self": {
                          "href": "http://example.com/api/v1/users/1/contacts/2"
                      }
                  },
                  "id": "2",
                  "name": "John Smith"
              },
              {
                  "_links": {
                      "self": {
                          "href": "http://example.org/api/v1/users/1/contacts/3"
                      }
                  },
                  "id": "3",
                  "name": "Jane Doe"
              },
          ],
          "address": {
              "_links": {
                  "self": {
                      "href": "http://example.org/api/v1/addresses/1"
                  }
              },
              "street": "Bakerstreet 11",
              "postal code": "123456",
              "city": "Some city",
              "country": "Some country",
          }
      },
      "id": "1",
      "name": "John Doe"
  }
  </code></pre>
  
  <p>So no matter whether I embedded the resources or not I always know where they are located. And for the contacts collection I will have the link to my collection endpoint in the <code>_links</code> array and the contacts themselves in <code>_embedded</code>.</p>