SpringSource/spring-hateoas — pull request #88 by chringwer (2013-06-24 18:23:53+00:00)
Title: Bug when serializing resources with HalEmbeddedBuilder 

I encountered a bug in HalEmbeddedBuilder. Adding more than 2 values with the same reltype to an embedded collection will result in somthing like this:

```
"_embedded" : {
"listItem" : {
"label" : "lorem",
"_links" : {
"self" : {
"href" : "http://localhost:3000/rest/lists/lorem"
}
}
},
"listItems" : [ {
"label" : "ipsum",
"_links" : {
"self" : {
"href" : "http://localhost:3000/rest/lists/ipsum"
}
}
}, {
"label" : "dolor",
"_links" : {
"self" : {
"href" : "http://localhost:3000/rest/lists/dolor"
}
}
} ]
}

```

A fourth item would be merged with the single `listItem` and then replace the collection and so on...