Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Database type not defined in mongo configuration
  • Hi, I'm trying to use the built in ORM to access mongoDb. I've enabled ORM in config, setup a model with the correct inheritance and call ::find() in my rest controller. All I get though is "Database type not defined in mongo configuration".  I have no problem accessing mongo directly.

    What am I doing wrong? Is ORM compatible with Mongo?

    Thanks in Advance,
  • Digging deeper, I am finding that it is expecting a 'type' property in the db connection (no specs for that) and it would use that to lookup a corresponding /core/classes/database/<db>/connecton.php.  There is not mongo database there, just mysql, mysqli and pdo. 

    So it looks like ORM is not hooked up to mongo and I can't use it. Is that true?
  • ORM doesn't support Mongo, and to be honest, Mongo doesn't support SQL queries too.

    If you want to interact with Mongo, use, which is going to be the Fuel v2 Mongo DBAL.
  • Thanks for the tip. The more I thought about it, the less it made sense that Mongo could use ORM because of it's sharded nature.

    I will check out monga... thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion