I'm trying to read data that has been saved in MongoDB and de-serialise it back into a POJO, using Jackson/Jongo. This works fine when the fields do not contain a hash. When the fields include a hash, Jongo thinks this is a placeholder so expects another object to replace it.
For example..
Person ed = collection.findOne("{name:\"ed\"}").as(Person.class);
.. works fine.
However..
Sale s = collection.findOne("{orderRef:\"#1000\"}").as(Sale.class);
.. does not work.
I've tried passing in a hash as an argument, but this still fails. For example:
Sale s = collection.findOne("{orderRef:\"#1000\"}", "#").as(Sale.class);
Has anyone else had any experience with this problem? Any assistance would be a great help!
Thanks,
Ed