CamelCamelCamel
CamelCamelCamel

Reputation: 5200

MongoDB in Kohana 3

I wrote a Mongo_Model to use inside kohana and felt pretty snappy about it until I tried getting anything working with it. The problem is the Kohana's Model class does many things for me that I don't want it to, such as creating a default database (and thus crashes my app). So how do I go about truly implementing my mongo model in Kohana? How do I disable the default database and Just use my model to handle everything with mongo? or the other way around, how do I change kohana's code to acknowledge me using mongo? I just don't want to stick my fingers where they don't belong (e.g. Kohana's system folder) and I want this to be as clean as possible. Any suggestions?

Thank you!

Upvotes: 1

Views: 2740

Answers (1)

Wade
Wade

Reputation: 852

You don't have to extend the Model class from your Mongo_Model class. The base model class is there in case you wish to use Kohana's database library.

There is a project for Kohana that implements MongoDB: https://github.com/colinmollenhour/mongodb-php-odm

Upvotes: 3

Related Questions