Please help in below situation. I have a text/doc/htm file which needs to be stored in mongodb using java application.(this part I have did using GridFS) After storing file, I want to retrieve the contents of file using a function/procedure inside mongodb, and store the information (i.e. filename and content) in json format so that I can map these values to my POJO class(having attributes filename and content).
Asked
Active
Viewed 36 times
0
-
Aside from being way to broad a question, you need to stop thinking in your SQL mindset of "stored procedures". There really is no such thing, and whilst it is possible to store JavaScript and call functions on the server, it is not very advisable and in fact a good deal of security recommendations would advise that the feature be disabled ( which is a server config option ). Start thinking "service layers" if you want something in between your functional code and the datastore itself. – Blakes Seven Aug 25 '15 at 12:37
-
can u pls elaborate on ur suggestion... even though i dont think it as sql, how we can achieve this kind of situation in mongodb... – user3742631 Aug 25 '15 at 13:08