-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Allow only specific properties (like Grails "includes" param) #12
Comments
I agree that this would be an useful feature for domain classes that have a lot of properties... |
+1 |
I just started using this plugin in favor over grails standard behavior. I can develop the feature, just need a little hint for where I should look. 😄 |
Hi @genuinefafa If you refer to this respond: http://grails.org/doc/2.3.11/ref/Controllers/respond.html, then I think this belongs to the controllers scope because it makes use of the request headers. This plugin on the other hand belongs to the domain and command objects scope. Cheers, |
Hi @aruizca The The main advantage of using You can see more information here or maybe check this out. The main advantage of this plugin (grails-marshallers), for me at least, is that it allow me to make deep JSON, and set-up mapping criteria inside the Domain Class. |
+1 for the include option - would be more than helpful! |
Guys, I'm a github newbie when it comes to pull requests, and a Grails newbie at the same time. But I really needed an include mode since I have a bunch of marshallers where only id/name pairs are needed, so there was a lot of unnecessary bloat in the form of very long ignore lists. I've got this working on my fork of the plugin (not pushed to github yet) - would you be willing to pull this change into the plugin? Right now I only have it implemented for JSON so I assume I would have to do this for XML as well. The way my implementation works is that include/ignore lists are mutually exclusive. If both are defined, then include takes priority. Let me know what you think - thanks! |
…rties - issue pedjak#12) + fixed some typos in the unit test
Guys, any chance of a new official release of the plugin (i.e. v0.7 published to the Grails plugin repository) in the near future? We'd love to avoid using a custom build for the include option. Thanks! :) |
I'll try to get it done ASAP
|
Thanks, that would be awesome! |
I encourage the author to release the HEAD of master as 0.7. I've forked the plugin and built my own into a private artifactory just to achieve this which everyone can benefit from. |
0.7 release has just been submitted for approval. |
@dhalupa How long does it usually take for approval? |
On 23.03.2016 13:41, Dominik Lakatoš wrote:
|
I'm currently using the domain class marshalling configuration style. Are you planning to add a counterpart to "ignore" called something like "only"? This would behave like Grails 2.3 respond()'s "includes".
There are times when I want to say "only allow these properties during serialization". Currently it requires using "ignore" but with many list items.
Also, why not deprecate the use of the term "ignore" and go with Grails terminology like "excludes" and "includes"?
The text was updated successfully, but these errors were encountered: