by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 21:18
    emadum opened #2556
  • 21:18
    emadum opened #2556
  • 21:18
    emadum opened #2556
  • 21:18

    emadum on refactor-core-cursor

    refactor: remove core cursor, f… Merge remote-tracking branch 'o… (compare)

  • 21:18

    emadum on refactor-core-cursor

    refactor: remove core cursor, f… Merge remote-tracking branch 'o… (compare)

  • 21:18

    emadum on refactor-core-cursor

    refactor: remove core cursor, f… Merge remote-tracking branch 'o… (compare)

  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken review_requested #2555
  • 20:30
    nbbeeken opened #2555
  • 20:30
    nbbeeken opened #2555
  • 20:30
    nbbeeken opened #2555
  • 20:25

    nbbeeken on create-before-ready-event

    test: :white_check_mark: Update… (compare)

  • 20:25

    nbbeeken on create-before-ready-event

    test: :white_check_mark: Update… (compare)

Ahmed Rebai
@Rebaiahmed

@Rebaiahmed
Hi Guys
I need some help
I'am looking for a ways to find not refernced documents in other collection with spring data mongodb
I just tried with this
db.getCollection('Actors').aggregate(
[
{
$lookup: {
from: "Market",
localField: "operatorsManager",
foreignField: "_id",
as: "actors"
}
},
{
$match: {
actors: []
}
}

]);
mmongodb Query but it returns all documents
not excepcted results

ilmucio
@ilmucio
are there an operation to do something like array.map(obj=>obj.field) in the aggregation framework?
hborole
@hborole
Hi

I am trying to connect to my mongod instance using the following command:
mongo --tls --tlsCAFile mongodb.pem --host localhost

But the .pem file has a passphrase which I don't know how to pass. Hence I am getting the error,

Failed global initialization: InvalidSSLConfiguration Unable to load PEM from 'mongodb.pem': Failing importing certificate(s): Passphrase is required for import/export.

Need some help! Thanks in advance.

Joseph Henshaw
@Big-jo
Hi! , please I need some design wisdom, I'm creating an application that uses two mongo databases, One database contains a User Collection(USERDB), the other contains a Post Collection(POSTDB), Would it make some sense to use a user's document objectID in the USERDB as an author id in the POSTDB ?
Phuong Nguyen
@neunygph
hi there
is anyone has experience with mongodb atlas
Samiul Salehin Pritom
@Pritom-Mazhi
hello, my code below should return 5 for nextInLine([5,6,7,8,9], 1) but, it isn't.
I dont understand what is wrong.
function nextInLine(arr, item) {
arr.push(item);
item = arr.unshift();

return item;
}
guobaxiong
@774649283
hi how to change the type of a filed? use forEach too slowly
db.zhulirecords.find({"initiatorUserId":{$type:16}}).forEach(
function(x){
db.zhulirecords.updateOne({_id: x._id}, {$set:{initiatorUserId: String(x.initiatorUserId)}})
}
);
khazim ndiaye
@zimkha
hi guys i'm new to mongo, i have a problem with mongo atlas,
I do not know what is an srv, I want to use mongo with node js, but to connect to my cluster I do not know what to do and according to the tutorial that I have nobody explained what is a srv
need help
tsavercool
@tsavercool
Is there a way to read an object back in dot notation? I'm looking for a quick and dirty way to read a collection and dump it to CSV.
Christian Roy
@roychri

Hello. I am trying to create a new user to access a new DB. I connect using a root user to the admin db and then I try to create a new user on a new db...

MongoClient.connect( process.env.JEST_MONGODB_URL, function( err, client ) {
    if ( err ) return console.error( err );
    const admin = new Admin( client.db( process.env.MONGODB_DATABASE ) );
    admin.addUser(
        process.env.MONGODB_USERNAME,
        process.env.MONGODB_PASSWORD, {
            roles: [
                {
                    role: 'readWrite',
                    db: process.env.MONGODB_DATABASE
                }
            ]
        },
        function( err, result ) {
            if ( err ) return console.error( err );
            console.log( result );
            client.close();
        });
});

Im using here client.db() and passing that to new Admin() because I thought that would create the user in that db, but its creating it in the admin db instead.

When I use the mongo shell I can use newdb and then create the new user and that works fine. How can I do this with mongodb native driver for node?

Joris W
@jorisw
Hi. How do I catch the database failing from a collection stream cursor?
Looks like I can shut down my database, and the stream cursor doesn't complain at all
Joakim
@Sefriol
Hey, is there any guidance on how to configure mongodb with replicasets on travisci? I'm trying to create tests using transactions.
Neil James Monzales
@godmode97
Hi! How can you remove a referenced object in a Schema?
Joakim
@Sefriol

Hey, is there any guidance on how to configure mongodb with replicasets on travisci? I'm trying to create tests using transactions.

The only reference I have found so far, but I'm not too big of a fan of sleep methods: https://georgeshank.com/how-to-enable-a-mongodb-replica-set-on-travis/

Fabricio
@ofabricio
{
    'key': 'ONE',
    'stages': [
        { name: 'prod', values: [ { 'value': 'one' } ] },
        { name: 'qa',   values: [ { 'value': 'two' } ] }
    ]
}
I need to do an update in that document, I'd like to either add a new stage if it doesnt exist or add to stage values if it already exists. Is this possible in a single mongo request? Or do you think i should rework my design?
ishu mishra
@coderishu
hello folks
i am beginner in backend
i am working on spring/java
Screenshot (4).png
mongodb
error
i thought to be an error related to mongodb credentials so i changed that too
but still showing same error
raphyav
@raphyav
How can I insert documents in collection if it not exist there else update it with the new values in Mongo DB. I am using node.js drivers for coding.
Erick Vicentin
@erickvicentin
Hi people!
Damien Doumer
@DamienDoumer
Hello, please a simple question: Should indexes be registered once only in a database's lifetime? What I'm currently doing is running the code to register the index at every initialization of the service which needs this. but is this the best approach or not ?
Manav Misra
@manavm1990_gitlab
Noob, so NS. WIKI that you will get ✉️s from the service advising about things that should be indexed based on what actually happening.
Ahmetcan Aksu
@ahmtcn123

Guys I searched all the stack I tried every examples but I couldnt update object inside of array

Here is the db

    mail: string
    password: string,
    db: {
        dialogEngine: {
            assistants: [
                [
                    apiKey: string,
                    maintenance: boolean
                ]
            ]
        }
    }

I want to update maintenance boolean here is the code I tried

    var update = await global.dialogEngine.db.db('users').collection('userdatabase').updateOne({
        mail: req.body.mail,
        password: req.body.password
    },
    {
        $set: {
            'db.dialogEngine.assistants.$[elem].maintenance':  req.body.maintenance
        }
    },
    {
        arrayFilters: [
            {
                'elem.apiKey': req.body.apiKey
            }
        ]
    });
syed
@Smssyed8
erverMs\server.js:28:40)
at Module._compile (internal/modules/cjs/loader.js:1144:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
at Module.load (internal/modules/cjs/loader.js:993:32)
at Function.Module._load (internal/modules/cjs/loader.js:892:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
do i need npm install or any other command to put my export in node modules
Yogesh Manjhi
@yogeshmanjhii_twitter
Hi guys,
Need some help with export and import of mongodb collection data via nodejs
here is the question i want to discuss
i am new to mongo so any help or idea is greatly appreciated
cooly
@cooly-me
Hi
yondering
@yonderbread
Hi all, I have an already existing database with 3 collections with documents in them
I need to retrieve the values by a specific key
Not a query
Ario K
@itsario_twitter
anyone know the performance affects of the $polygon query on 300+ element polygon: https://docs.mongodb.com/manual/reference/operator/query/polygon/
that can be done quite often
The '2d' index is applied obviously
javadevelopment4
@javadevelopment4
This may be useful for anyone - Turn your pc to lightening speed in 7 steps - https://www.youtube.com/watch?v=n0odMfF2yWQ&feature=youtu.be
Mohammad Fayaz
@fayaz07

is there any technique like, if I have two collections

posts:
 - userId
 - other fields...
users:
- userId
- name
...

like, if I just make a find of posts that also fetches the name of the user

Note: without lookup or join