Below you will find pages that utilize the taxonomy term “Grails”
Accessing Request Parameters in a Grails Domain Class
It’s not exactly elegant to work with request parameters in a domain class but it was necessary. I have a bunch of domain classes with “asMap” methods where they render themself into a map and cascade to other domain objects as needed. In the controller, the resulting map is given to the renderer and we get a nice json response.
So now I’ve changed some fields and in order to stay backwards compatible, I created a new apiKey (a parameter needed for all calls to my app) that distinguishes old and new clients.
Accessing Request Parameters in a Grails Domain Class
It’s not exactly elegant to work with request parameters in a domain class but it was necessary. I have a bunch of domain classes with “asMap” methods where they render themself into a map and cascade to other domain objects as needed. In the controller, the resulting map is given to the renderer and we get a nice json response.
So now I’ve changed some fields and in order to stay backwards compatible, I created a new apiKey (a parameter needed for all calls to my app) that distinguishes old and new clients.