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.
Related
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/
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"
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.
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?
Our organization builds web applications using PHP/Informix.
Currently we do not have any frameworks and use our own libraries and modules.
Now we set up a new apache web server so that we could install and configure a framework where all brand new web applications can be developed.
I was thinking of setting up the Zend Framework.(Will it go with informix backend?). I have googled and looked around for information , but I thought would get some expert opinions from the experts here.
I need some advice as how to go about from scratch the correct way.
Installing,configuring,setting up a version control and writing a script to test all basic MVC features.
Any suggestions and references would be helpful.
If you are using Informix Dynamic Server as your backend, then yes you can use Zend Framework's native database classes and adapter for communicating with your Informix server.
Your requirements will be that PHP must be compiled with PDO support (enabled by default since PHP 5.1). You then need to download, compile, and install the PDO_IBM Pecl package.
In order to successfully build the PDO_IBM extension, you must have the DB2 client (9.1+) installed on your system already. When you compile the extension module, you must tell it the path to where those files are installed.
More information on PDO_IBM, and Zend_Db_Adapter talks a little bit about the available adapters (including PDO_IBM).
There is also a Pecl package PDO_INFORMIX for talking to Informix servers, but Zend_Db does not support this package. You will only be able to use Zend_Db_Adapter with PDO_IBM to communicate with IDS servers.
Hope that helps.