MongoDB is a scalable, high-performance, open source, document-oriented database. This tag is used for questions related to the Java language bindings and drivers for MongoDB.
currently I'm working on a project in JAVA, and I need to run the Javascript Mongo queries through JAVA, and I figured I can do something like that using db.eval() in java. Problem is I have the following Javascript query for Mongo, and I have no…
I have document structure like:
{ "_id": { "$oid" : "51711cd87023380037000001" },
"dayData": "{ "daysdata":{"date":"02-12-2013","week_day":"","month":"","date_day":"","year":"2013"}}"
}
I want to extract document having date =…
I am wondering if MongoDB provide some good schema for identifying documents in the database. Suppose I have initialized a database like this:
public static void main(String[] args) {
MongoClient mongo = new MongoClient("localhost", 27017);
DB db =…
I am trying to add an element to a BasicDBList array and save it back to Mongodb, but when I check the result, it is not written. What did I do wrong? I use java driver version 2.7.2.
DBObject dbObject = coll.findOne(dbQuery);
BasicDBList…
If a function call is done in java like:
collection.update(match, new BasicDBObject("$pull", update));
How can I know the number of documents updated in database after this statement execution?
And my other problem is, that I want to remove an…
I can see the following in my tomcat logs but do not understand why and how to solve:
Mar 19, 2013 3:50:01 PM com.mongodb.DBPort _open SEVERE: going to
sleep and retry. total sleep time after = 38ms this time:100ms
I am using java,…
I have a mongodb database server.I want to get it fill up with large number of entries in a particular collection let say a collection named "user".
I want to know if there would be a script for saving large no of randomly created entries in my…
I have a collection called "messages". Each message has a 'read' boolean value. In some instances when I retrieve the messages, I'd like to set the value to 'true', while returning the pre-modified value.
So, let's say I have 1 message, whose…
I'm using spring-data-mongodb version 1.1.1.RELEASE. I am able to persist an object if all the member variables are primitive types, even if the names of the @PersistenceConstructor arguments don't match exactly the names of the member variables by…
I want to search about MongoDB for Java, its own site is good.
But i want to learn much and its Admin UIs,is any book you can recommend to me? or any other good blog? Thanks.
I am using java,Datanucleus,mongodb and JDO in my project.
I have a requirement where I should generate sequence number and store it in DB.
I was going through various links and found that DataNucleus supports the automatic assignment of sequence…
I am a new to using Mongo DB and exploring the frameworks around for migrating from mysql to mongodb. So far from my findings I have been able to figure out SpringMongo as the best solution to my requirements.
The only problem is that instead of…
I am new to MongoDB. And now i got a puzzle:
say i've got a query workable in mongo console
{
"_id": {
"$oid": "50a5e1cd703d7e9c65326bf9"
},
"people":{
"name":"arthur",
"tele": "001-837475"
…
I have a mobile app for which I need a java/mongodb support in the Backend. I am thinking of various combos to use. I dont wanna spend a lot of money to begin with as its just a 'hobby' app, for now.
These are the various options I have thought…