That was quite the wild ride of PR's and patches t...
# klaxon
j
That was quite the wild ride of PR's and patches to
master
right there. Hahaha. Glad we got everything fixed up.
u
[grails/grails-core] New comment by el-duderino5 on issue #11107: Restful service receives null JSON object when it is embedded inside a more complex JSON object One question: the main object that contains "ruta" (which means route in English) used to have a many-to-one relationship with the main object that contains it (which is the cattleman). The idea that I had in my head is that a route belonged to the cattleman, and that the relationship had to be that many cattleman could be located in one route. That meant putting a Route object in my cattleman domain, and a cattleman in my Route domain (with a [belongsTo] to have a bidirectional relationship plus cascade saves and possibly deletes). Do you think that may had something to do with it? Although, I can not see how that could possibly cause the route to be a null object in my REST endpoint. Something else must be causing a deserialization problem when there are embedded objects in a JSON object. In the end I had to settle for a one-to-many relationship between Routes and Cattlemen, as that made the most sense, and save the route first, so that it could have an id, so that I could later send a request to my endpoint with an embedded Route with just one property (the Id of the route), so that I could persist the whole object graph. Despite this, it would be sweet if could construct the whole graph first, and then make it persist by sending it to my rest endpoint, following, of course, the rules of cascades saves and deletes. For now I would just like to know why the route is arriving as a null route unless I give it a non-null Id (even if said Id doesn't even exist in the database yet).