问题
I was wondering if its possible to use a json-based schema-free, document-based database like Mongodb or Couchdb on a symfony project like its used for ruby-on-rails websites? And if yes, how can it be done?
回答1:
There is a DoctrineMongoDBBundle for use with Symfony 2
回答2:
You might get some help from the MongoDB PHP Language Center. There are links to several PHP libraries for MongoDB, including a centralized logger for symfony applications.
回答3:
You can also check out http://li3.me/, the only full-stack PHP framework with fully-integrated support for MongoDB (and CouchDB).
回答4:
Try building your project with the no-orm flag. There is little need to have an object relational database if you are not using a relational database. Just build classes for your data in PHP. These will function as your schema, which makes sense sense as a schema is not defined at the data layer.
回答5:
AFAIK, the only framework to have integrated Mongo support as of yet is Vork.
I saw a post from someone who retrofitted Cake to use MongoDB, but they basically had to rewire the whole model-engine.
回答6:
All the majore modern framework can work with Mongodb. Symfony do it very well with doctrine as an exemple
来源:https://stackoverflow.com/questions/1444685/symfony-php-framework-and-mongodb-or-any-json-based-database