Simple start use Doctrine2 mongoDB ODM - mongodb

I wanna start use of mongoDB via Doctrine2, I installed MongoDB and working!
(Windows8 64bit, PHP 5.4, Xampp, NetBeans7.2)
but my problem:
I downloaded Doctrine 2 mongoDB ODM from https://github.com/doctrine/mongodb-odm and read document here http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html but i cant setup doctrine 2 yet! :(
i'm not workin via big freamworks (ZF or Sym), usually use light MVC pattern!
can anyone create (or show me how to start use that!) simple project that work with one object like users via Doctrine 2 MongoDB ODM?

Related

Correct way of using Mongoose in Deno

In the previous project, I'm using NodeJS with Mongoose to handle schema and db connection, now that I'm trying to migrate to Deno, I found that Deno doesn't have Mongoose yet as its third party module.
I saw the reference, seems like they are using NPM to add mongoose (which means back to NodeJS way). The schema I found from deno_mongo is different from the schema I used in prev project.
And there is no example on how to use other collection id as reference to the current collection, for example:
userprofileid: {
type: mongoose.Types.ObjectId,
ref: "user_profiles"
},
so how to convert the code above?
Mongoose does not currently support Deno. See the answers in this feature request: https://github.com/Automattic/mongoose/issues/9056.
As described there, the problem is currently is that
Deno bugs out with the require_optional npm module, which is something that the MongoDB driver uses internally.
The second Problem:
Even without require_optional, Deno currently doesn't have a polyfill
for Node's crypto module: https://deno.land/std/node/README.md .
That's going to be hard for the MongoDB driver to work around.
look like it has been solved. Especially because there are already modules for MongoDB connection.
If you can do without the ODM from Mongoose, then you can use Deno Mongo (https://github.com/denodrivers/deno_mongo).
This connects you to the database and you can send your queries directly with Mongo database commands.
If you look at the third party modules on the Deno page and search for Mongo, you will unfortunately find that there is currently no ODM module for Mongo DB (https://deno.land/x?query=mongo)
There seems to be a similar ODM for Deno at https://dangodb.land/

How to configure Mongodb with Laravel 5.4?

I tried to install "jenssegers/laravel-mongodb" from git
https://github.com/jenssegers/laravel-mongodb
and all the configuration has been done. but how can I know that my Laravel project successfully connected to MongoDB database?
Have you installed mongo? if not, here's a guide:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
if you want to try if it works, simply try to save something to the db using eloquent.
Just remember that in your model, extend "Jenssegers\Mongodb\Eloquent\Model" instead of "Illuminate\Database\Eloquent\Model"

How to integrate MongoDB in Django1.10 and Python3.5?

I would like to use mongoDB as a database on behalf SQL for my django project. Where in we are developing the apps with django1.10 and python-3.5 version. We installed MongoDB in ubuntu-16.02LTE and thought to use MongoEngine to work with python3.5 and Django-1.10. But we don't have proper document to integrate this in python and Django.
1) Did python 3.5 or django-1.10 support this procedure? if Yes please share document to refer
You answer to solve this more valuable for us
Thanks
Does this post help? It looks like MongoDB doesn't work with Django, and you will have to use mongoengine.

How to connect to Meteor's MongoDB instance using NetBeans?

I'm doing web development with Meteor, with runs MongoDB and minimongo as the default database.
NetBeans is the IDE I like, and am using for the HTML, CSS and JavaScript without a problem.
I'd like to be able to query the Meteor's MongoDB instance using NetBean's database GUIs as well; I don't know if any of NetBeans' standard DB views support MongoDB, but I have installed the NBMongo plugin, which adds a view for MongoDB, and have other integration troubles covered.
My problem is that I don't know how to connect to the Meteor's MongoDB (/minimongo) from the NetBeans plugin.
How do I do it?
Found the answer.
When you run meteor mongo on the shell/command-prompt, one of the things it will tell you is which address and port the Meteor's instance of the MongoDB is being run on. This is the key point I missed.
In most cases, as I was seeing in the references I found online, this will be 127.0.0.1:3001, or localhost:3001.
This wasn't the case for me, and that was why I was having trouble to setup my connection configuration.
I configured the NBMongo plugin's connection to mongodb://[correct address]:[correct port], and voilĂ ! Everything's working like a Swiss clock again!

How can I use Sails.js without Waterline?

I tried out Sails v10 beta and liked associations in Waterline.
However, I would like to try out the Sails framework using the native MongoDB driver sans any ORM. Is there any easy way to do this? Or are Waterline and Sails.js tightly coupled together?
Yes, Waterline and Sails.js are tightly coupled together. But...
You can still use native MongoDB driver (just like any other module) with Sails.js. In order to do so:
Don't create / generate any Sails.js models (otherwise they'll be autoloaded).
npm install --save mongodb to install the native driver and add it to package.json.
require('mongodb') in your controller and off you go.