Closed johnhearn closed 10 years ago
Just so I can understand the behavior does this mean that maps by default show all keys unless a selector is applied?
It looks like Maps should only show keys that are are passed in from the url. @johnhearn: can you please confirm that was the intent?
We should also probably think about a way to do a manual configuration for standard fields to show in lieu of @Core. I haven't thought about how that kind of configuration should look.
yeah, I believe the current version of yoga seems to already have this behavior because I've run into it so I'm trying to figure out if this fixes our issue, we have some maps where the end user can't know the keys in it so i'd really like something like @IncludeChildren or selector=fields(*) or something like that
The intent was to mimic the current default behaviour for pojos, that is, keys must be explicitly selected to appear in the output. As far as I know there is currently no way to include default keys, like we can pojo fields with the @ Core annotation. Perhaps a new annotation is needed, something like @CoreMap(keys={"a","b","c"}), although that looks a bit ugly to me and I have not as yet come across a need for it.
The result traverser treats maps as pojos and therefore does not expose the keys in the map to selectors. With this change, maps are treated specifically and selectors can be applied to their fields. This is working in our application. Any feedback welcomed.