|
[
Permlink
| « Hide
]
Ben Dotte added a comment - 11/Jul/08 01:05 PM
We need this feature for an upcoming release so I took a stab at implementing it and attached a patch that seems to do the job. It looks like the logic was already there, just a matter of adding the setting and updating the schema.
Applied the patch. The patch was partial, as it was not setting the actual property (which I added in the ResolveLate... class).
So now, the sum up, including unmapped properties in all can be controlled by the following setting: compass.property.all.includeUnmappedProperties. The default is true. It can also be controlled on a class/resource/xml/json mapping within the all mapping. Can you please check and verify that things work? I am closing the issue for now, if something is wrong, I will reopen it. Thanks for applying the patch. I re-tested it and it works except the property is defaulting to false instead of true. It works fine if I explicitly set it to true or false.
I had original changed the property to a Boolean and added the ResolveLate code but hit an NPE since ResolveLate wasn't setting the value soon enough (I think). So I put it back to private boolean includePropertiesWithNoMappings = true and removed the ResolveLate stuff and then it worked, but maybe that is wrong if the property is set in a different way from the way we are doing it (in compass.cfg.xml). Its strange that you say the property default to false, in the resolve late the default to true. The NPE happens in some of the tests since not all of them go through the resolve late processor (lower level ones). It should have been set in them explicitly.
Yes, the property is defaulting to false within our application running on the latest code from trunk (not in a unit test). It defaults to true using only the code from my patch. Maybe the resolve late stuff isn't initializing the value soon enough?
The NPE does not currently happen, I was saying it did happen in the code I was writing when I was trying to implement the ResolveLate section, but I backed that out. |
||||||||||||||||||||||||||||||||||||||||||