PHPackages                             brandonwestcott/li3\_mongo\_embedded - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. brandonwestcott/li3\_mongo\_embedded

ActiveLi3-libraries[Database &amp; ORM](/categories/database)

brandonwestcott/li3\_mongo\_embedded
====================================

Lithium PHP mongo embedded relations

18PHP

Since Aug 24Pushed 13y ago3 watchersCompare

[ Source](https://github.com/brandonwestcott/li3_mongo_embedded)[ Packagist](https://packagist.org/packages/brandonwestcott/li3_mongo_embedded)[ RSS](/packages/brandonwestcott-li3-mongo-embedded/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

[Lithium PHP](http://lithify.me) Plugin to allow embedded relations for MongoDB
===============================================================================

[](#lithium-php-plugin-to-allow-embedded-relations-for-mongodb)

This is in its early stages and only supports READ operations. Hopefully, this plugin will not be needed for very long as li3 plans to support embedded relations in the core.

A plugin to add support to li3 embedded relations for MongoDb. Lithiums mongo adapter says it supports embedded relations, but after much investigation through the core it appears this is not the case. Basically, when an embedded relation is specified, it does the single query for the parent and when the data is returned it creates the appropriate model with the data returned from the parent.

Installation
------------

[](#installation)

### Use Composer

[](#use-composer)

Modify your projects `composer.json` file

```
{
    "require": {
    	...
        "brandonwestcott/li3_mongo_embedded": "master"
        ...
    }
}
```

Run `./composer.phar install` which will install this library into your app/libraries

### Alternately, just clone, download or submodule

[](#alternately-just-clone-download-or-submodule)

1. Clone/Download/submodule the plugin into your app's `libraries` directory.
2. Tell your app to load the plugin by adding the following to your app's `config/bootstrap/libraries.php`:

Usage
-----

[](#usage)

Add the plugin in your `config/bootstrap/libraries.php` file:

```
