Closed StevenDevooght closed 10 years ago
great! thanks! but I want to keep the MongoLite API as close as possible to the mongodb API, so you can easy switch between them. what do you think about creating a standalone populate helper class which works with both, mongodb and mongolite?
https://github.com/aheinze/cockpit/tree/master/vendor/MongoHybrid , the population class would perfectly fit there
Aha, okay. That approach makes more sense indeed. I'll have a look if I can put it in.
I started working on functionality to populate a document with another sub document. Currently oneToMany and ManyToMany scenario's are supported.
A document can be populated using the following method. The first argument is the property of the document you want to populate. The second argument is the name of the collection used to populate the document.
For now only one level of population is supported. Everything is contained within the following commit: https://github.com/StevenDevooght/MongoLite/commit/aefaee61cd4897f3879ef2fdea2ca4bebe8bbbf6