This might be documented somewhere but I ran across a problem today when trying to use the Dynamic Finders with a property named Port which contained the substring “or” in it. The message received was:
The property you requested P is not a valid property in the Nifty entity
My line of code was called from a handler was: niftyService.findByPort(port).getID();
Apparently if you have entity properties that contain the substring “or” or “and” then the dynamic finder thinks you are specifying additional criteria.
Is there a way to get around this while still using Dynamic Finders?
I just ended up creating an actual niftyService.cfc and using Criteria Builder instead…but hoping there is a better way?
I’ve never looked at that code, but it seems like there’s no reason not to be able to work around that. If the string is parsed from left to right and the code looks for full property names first starting with the longest to the shortest property name, THEN looks for a keyword like and/or then it should fix that.
Still having some problems with this now that I switched to the cborm module in CB4 (though I doubt it’s due specifically to that, I just haven’t tested this functionality in a while)
Opened an issue in cbox-cborm, probably an easy fix on the RegEx but I haven’t been able to dig it out yet.