Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: Grails-FilterPane 2.0
-
Fix Version/s: None
-
Labels:None
Description
given two domain classes
class MyDomain {
User createdBy
User lastUpdatedBy
}
class User {
}
you cannot filter with associatedProperties="$
{['lastUpdatedBy.id', 'createdBy.id']}" because the referenced class property is used as map key which is in this scenario 2x the same User.id GrailsDomainClassProperty. And here i am not speaking of values (they make no difference) but of equality of the GrailsDomainClassProperty instance.
FilterPaneTagLib.groovy: refProperty = refDomain.identifier ... finalProps[refProperty] = dottedName
this means only the last association based on the same property is used, former ones are overridden.
I've attached a patch to FilterPaneTagLib.groovy based on FilterPane 2.0.1.1 that appears to fix this problem.