turkraft / springfilter

Dynamically filter JPA entities and Mongo collections with a user-friendly query syntax. Seamless integration with Spring APIs. Star to support the project! ⭐️
https://turkraft.com/springfilter
221 stars 37 forks source link

Backslash Query Issue #382

Closed 4ntP3d closed 4 months ago

4ntP3d commented 4 months ago

Hi, I'm currently using version 2.x.x of the software. I've encountered an issue where it seems impossible to pass the backslash "\" character as a value in a query. To elaborate, when I attempt to send the query "description~'\*'", I receive an error during the filter conversion process. The error message reads: "token recognition error at: ''\'". However, when I query "description~'\\*'", everything works perfectly. This leads me to question how I should proceed if I need to search for a record that contains a single backslash within one of its properties. Any guidance would be greatly appreciated. Thank you.

torshid commented 4 months ago

When you query description~'\\', is it sending two backslashes to the database? I think it should send only one.

2.x is not supported anymore by the way, I recommend you upgrade to 3.x which is much more flexible.