Skip to content
CakePHP 2.0 plugin to bridge with Doctrine MongoDB ODM in order to use models as objects persisted by Doctrine. This changes the original CakePHP feature of returning arrays of results, and instead returns objects wich are cleaner to manage and extend.
Latest commit 5916c3e Jan 27, 2012 @lorenzo Fixing notice
Failed to load latest commit information.
Lib Fixing notice Jan 27, 2012
Test Fixing typo in fixture, closes #2 Sep 21, 2011
.gitmodules Added database option to docs Sep 5, 2011


Change into your Plugin directory, and checkout the git repo:

cd Plugin
git clone git://
cd MongoCake
git submodule update --init --recursive


You first need to activate the plugin in CakePHP after placing it in the correct folder:

CakePlugin::load('MongoCake', array('bootstrap' => true));

Use this MongoCake plugin like any other datasource, with its own configuration options:

// Within Config/database.php
public $default = array(
    'datasource' => 'MongoCake.CakeMongoSource',
    'server' => 'localhost', // Optional
    'database' => 'mydatabase', // Database to use


Ensure that your models extend the CakeDocument class.

class User extends CakeDocument {
Something went wrong with that request. Please try again.