Good catch, thanks. DefaultProjectionHitMapper can't be stateless because its purpose is to hold a mutable list of references to load. We need to turn getProjectionHitMapper into a factory method, or to make sure DefaultProjectionHitMapper clears it state after loading. I think the first solution is more robust as it will work even if a search query fails after having added references to the hit mapper but before loading entities. |