mongodbodm playing in sf1
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps/admin
cache
config
data/fixtures
lib
log
test
web
.DS_Store
.gitignore
.gitmodules
README.markdown
symfony

README.markdown

Doctrine MongoDB Object Document Mapper with Symfony 1.4

This build includes symfony project setup with mongodbodm.

The following symfony2 components have been used.

  • class-loader
  • console
  • yaml

ProjectConfiguration has been enabled for using mongodb

Installation:

1. Clone the repo to your local machine.
2. Run the following commands  from repo root
    $ git submodule init
    $ git submodule update
3. cd to lib/vendor/mongodb-odm
4. Run curl -s http://getcomposer.org/installer | php
5. Run php composer.phar install
6. clear the cache

Usage

1. create an odm.yml in config folder
    2. Configure the database as follows:
        odm:
          database: testdb
    3. Initialize a document manager object by using sfDocumentManager::getDocumentManager()
    4. Database can be changed using sfDocumentManager::setDatabase($database)
    5. Doctrine ODM Configuration object can retrieved using sfDocumentManager::getConfiguration()

Note: mongoActions has been deprecated.

More resources: