Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
SpringBeanContainer not working with Hibernate Search's ParameterizedBridge [SPR-17311] #21844
I tried to upgrade my project using spring and hibernate to spring 5.1.
I use customized search mappings via org.hibernate.search.cfg.SearchMapping and have some instances were we customize a bridge via org.hibernate.search.cfg.FieldMapping#bridge.
I noticed that the classes I supply there must now be instantiated with spring. This surprised me a bit, but well.
The issue arises if the class is also a org.hibernate.search.bridge.ParameterizedBridge, and we set some 'params' (org.hibernate.search.cfg.FieldBridgeMapping#param)
Different fields with the same bridge implementation but with different params, now receive the same instance of the class, so things gets mixed up. The param of one field influences the behaviour of another field.
It boils down to that parameterized bridges get unusable. The first thought was, since the instance are now managed by spring, that I could also configure them there, but it seems that they are matched on class only, so I have to extend the bridge for every instance with different params, more or less mooting the complete point of parametrization.
It could be that I missed something, but I couldn't easily find out what that would be.
Affects: 5.1 GA
Juergen Hoeller commented
Not sure whether the bug is in Hibernate 5.3's handling of the