bguerout/jongo

Escape `#`. `Not enough parameters passed to query` error

Opened this issue · 0 comments

I ran into an issue where I got a Not enough parameters passed to query error when I tried to update a document where a field value contained hash. I know that jongo use hash for its query templating, but is there any way to escape it?

Example of the problem:
update("{id: 0}").with("{id: 0, message: '# hello, # world'}");

In practice this is a much larger and more complex object that is serialized at an earlier stage from a pojo so trying to rewrite it to fit the query templating is a bit tricky. If I could just do a replacement to escape the hashes that would be preferable.