PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 22nd of December, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[14:07:40] <nfr> Hello, I have a Docker container that runs Debian Stretch. I installed the mongodb-org-server package. I cannot use "service mongod start" ("unrecognized service") and I also cannot use "system-ctl start mongod" ("Failed to start mongod.service: Unknown unit: mongod.service"). Any idea how to start mongod? Thanks in advance!
[15:16:24] <ExtraSteve> I'm tryign to use composer's mongodb/mongodb driver to find something that has a particular object ID. $collection->find(['foreignKey' => '5c498d36e41f583b9a4cc1ef'])->toArray() isn't working...
[15:17:11] <ExtraSteve> The older mongodb libs for php have an ObjectID class, so it'd be something like: find(['foreignKey' => new MongoId('5c498d36e41f583b9a4cc1ef')]
[15:17:55] <ExtraSteve> How do I do this with the MongoDB\Driver library?
[15:18:09] <ExtraSteve> I"m not seeing anything about an object ID class in the documentation :(
[15:29:47] <ExtraSteve> False alarm, found it
[15:29:51] <ExtraSteve> Turns out it's MongoDB\BSON\ObjectID
[15:29:55] <ExtraSteve> :)
[15:44:14] <GothAlice> ExtraSteve: The amount of difficulty people run into with that.
[15:44:24] <ExtraSteve> heh
[15:44:33] <ExtraSteve> I'm glad I at least figured it out on my own...
[15:44:39] <GothAlice> https://stackoverflow.com/a/55386123/211827
[15:44:51] <GothAlice> Or with dates: https://stackoverflow.com/a/58040505/211827
[15:45:33] <GothAlice> I'm also glad you figured it out. Sometimes, like with that first SO link, it's hard to convince people typecasting is the actual problem. "It looks right!" "Only if you're blind…" ;^P
[15:46:15] <ExtraSteve> I didn't even realize it was a typecasting issue