I am using seneca-mongo-store to save the entities into backend mongodb. Here is the code I am using to save
function addObject(object){
connectToMongo('stupidDB')
seneca.ready(function(){
var collection = seneca.make$('install')
console.log("entering object")
console.log(object)
collection.save$(object, function(err, reply){
if( err )
console.log(err)
else
console.log("Reply : " + reply)
closeConnection()
})
})
}
The result of execution of this code is
$ node mongoConnect.js
2016-08-08T12:01:25.470Z 912dfpdw7ytw/1470657685436/29552/- INFO hello Seneca/0.7.2/912dfpdw7ytw/1470657685436/29552/-
entering object
{ date: 1470657685818,
product: 'MCS',
release: '16.2.1',
'SESSION ID IN LOG FILES': { '/tmp': 'json object', '/u01/app': 'json object' },
'CRYPTOGRAPHIC NAMES CHECK': { '/tmp': 'json object', '/u01/app': 'json object' } }
Reply : $-/-/install;id=1p2kfa;{date:1470657685818,product:MCS,release:16.2.1,SESSION ID IN LOG FILES:{/tmp:json object,/u01/app:json object},
seneca database connection closed!
The object is being passed but only a part of it is being stored. Is there a length restriction on it in secena plugin? Is there a setting I can change to save large json objects? Or there is some error in my way of using it? As per mongodb specifications a document can be of 16 mb size.