Tagged Questions
0
votes
0answers
48 views
Raw javascript mongodb queries using db.eval() in java
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 ...
0
votes
1answer
56 views
querying on internals in mongo
I have document structure like:
{ "_id": { "$oid" : "51711cd87023380037000001" },
"dayData": "{ "daysdata":{"date":"02-12-2013","week_day":"","month":"","date_day":"","year":"2013"}}"
}
...
0
votes
1answer
109 views
How to retrieve all matching elements present inside array in Mongo DB?
I have document shown below:
{
name: "testing",
place:"London",
documents: [
{
x:1,
y:2,
...
0
votes
1answer
87 views
How to retrieve element present inside array in Mongo DB?
I have structure shown below:
{
field1: "somevalue",
name:"xtz",
nested_documents: [
{
x:1,
y:2,
...
1
vote
1answer
81 views
Java/Mongo Query with geoLocation and within specified timeframe
I am having some issues retrieving the correct date within a particular radius from MongoDB. I have a json example shown at the bottom. My goal is to search for all items close to a defined ...
0
votes
2answers
234 views
ORM for Spring-MongoDB integration with native querying support
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 ...
0
votes
2answers
1k views
MongoDB Java driver : no such cmd: aggregate
I am calling the MongoDB aggregate function in my code as :
AggregationOutput output = collection.aggregate( matchUserID, unwindF, matchFUsers,projection);
I have tested my code in my localhost, ...
1
vote
1answer
732 views
MongoDB find subdocument ids
I have my schema setup this way:
{
_id:1234,
friends: [
{
"fid":1235
"is_user":true
},
{
"fid":1236
...
0
votes
1answer
70 views
How to Query MongoDB, only using the value of inner elements and it's path
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":{
...
1
vote
2answers
705 views
How to get mongo command results in to a flat file
How do I export the results of a MongoDB command to a flat file
For example, If I am to get db.collectionname.find() into a flat file.
I tried db.collectionname.find() >> "test.txt" doesnt ...
0
votes
2answers
367 views
delete a record in mongodb
I have a collection like this.
System
{
System_id: 100,
system_type:
{
[
{
Tenant_Id: 1,
Tenant_Info: ...
0
votes
4answers
315 views
Mongodb inserting doc without _id field
I am newbie to mongodb.
I need to insert a doc without _id field generating automatically.
I need to set the field tenant_id has unique or need to change the "_id" field as Tenant_id.
how to do ...
0
votes
1answer
454 views
Mongodb updating and setting a field in embedded document
I have a collection with embedded documents.
System
{
System_Info: "automated",
system_type:
{
system_id:1,
Tenant: [
{
...
0
votes
3answers
73 views
Mongodb Schema design suitable one suggestion
Hi I am newbie to mongodb.I am using java.
I have 2 tables system, system_properties in my relational table.
Something like this.
Table Fields ...
1
vote
1answer
119 views
Mongodb checking and adding reference value
I have two collections.
checkone
{"_id":1,"name":"alex"},
{"_id":2,"name":"sandy"}
checktwo
{"_id":11,"password":"alex",tenant_id:{$ref:"checkone","$id":1}}
...
0
votes
1answer
279 views
mongodb - Sub document id value
I have a collection.
look
{ "_id" : 13.0 , "tenantref" : { "$id" : 3.0}}
I need to retrieve the value of id 3.0 using java.
I am getting null pointer exception.
BasicDBObject field = new ...
1
vote
2answers
762 views
mongodb java to insert embedded document
I have a collection with embedded documents in it.
System
{
System_Info: ...,
Tenant: [
{
Tenant_Id: ...,
Tenant_Info: ...,
Prop_Info: ...
},
{
...
0
votes
0answers
241 views
mongodb java - getting Id value
I have two collections
testone
{"_id":1,"name":"alex"},
{"_id":2,"name":"sandy"}
testtwo
{"_id":11,"password":"alex",tenant_id:{$ref:"testone","$id":1}}
...
2
votes
3answers
197 views
Mongodb database Schema Design with shared data
Hi I am newbie to mongodb.I am using java.
I have 4 tables Tenant,system,authorization in my relational table.
Something like this.
Table Fields
Tenant Tenant_ID(PK), ...
2
votes
1answer
385 views
dbref command in mongodb
I am newbie to mongodb. I need to do a query by reference two collections using dbref and need to query particular fields.
comments collection
{
uid:12345,
pid:444,
...
0
votes
1answer
432 views
Views exists in mongodb? [duplicate]
Possible Duplicate:
SQL view in mongodb
I am newbie to mongodb (java).
I need to know whether something like views(in relational) exists in mongodb?
Is it possible to create views ...
0
votes
2answers
102 views
is procedure exist in mongodb
I am newbie to mongodb (java).
I need to execute list of commands(queries in relational) by using something similar to procedures in relational db.
Is it possible in mongodb?
4
votes
2answers
4k views
Mongo DB query in java
I have to write a complex mongo query using java but am not able to do it.
The mongo query looks like this:
db.video.findOne( {
$or: [
{ key1: { $in : [764] } },
{ key2: {$in ...
0
votes
1answer
876 views
Spring-Data mongodb querying multiple classes stored in the same collection
With Spring-Data, you can use the @Document annotation to specify which collection to save the object to. Say I have two classes, Student and Teacher, both persisted into the people collection. When ...