title: Nested embedded in HAL using Spring HATEOAS
body: <p>I am looking for examples how nested _embedded in HAL can be programmed using Spring HATEOAS API. What are the best practices ? </p>
  
  <p>Here an example of what I want to achieve:</p>
  
  <pre><code>{
      "_links": {
          "self": { "href": "/invoices" }
      },
      "_embedded": {
          "invoices": [
              {
                  "_links": {
                      "self": { "href": "/invoice/1" }
                  },
                  "_embedded": {
                      "items": [
                          { "_links": { "self": { "href": "/product/1" }}, "id": 1, "name": "Super cheap Macbook Pro", "price": 2.99 }
                      ]
                  },
                  "id": 1,
                  "total": 2.99,
                  "no_items": 1
              },
              {
                  "_links": {
                      "self": { "href": "/invoice/2" }
                  },
                  "_embedded": {
                      "items": [
                          { "_links": { "self": { "href": "/product/2" }}, "id": 2, "name": "Raspberry Pi", "price": 34.87 },
                          { "_links": { "self": { "href": "/product/3" }}, "id": 3, "name": "Random product", "price": 30 },
                          { "_links": { "self": { "href": "/product/4" }}, "id": 4, "name": "More randomness", "price": 30 }
                      ]
                  },
                  "id": 2,
                  "total": 94.87,
                  "no_items": 3
              }
          ]
      }
  }
  </code></pre>