spadefoot / kohana-orm-leap

An ORM module for the Kohana PHP framework that is designed to work with all major databases.
http://spadefoot.github.io/kohana-orm-leap/
100 stars 25 forks source link

Unable to find connection. Doesn't ORM-Leap connect to database automatically? #40

Closed taai closed 12 years ago

taai commented 12 years ago

Hi,

$zoomer = DB_ORM::model('zoomer', 123);

This gives me an error:

Kohana_SQL_Exception [ 0 ]: Message: Failed to query SQL statement. Reason: Unable to find connection.

Doesn't this module automatically connect's to the database like Kohana's ORM does? Or I'm doing it wrong?

bluesnowman commented 12 years ago

Yes, it should. I will fix it immediately. I have been fiddling with the connection class over the last few days and one of my commits accidentally merged some bad code. It will be fixed in the next few hours.

bluesnowman commented 12 years ago

I have reverted the connection pool class on the 3.1 master and 3.2 master to an older version and have tested that it works. You should be able to utilize the module now like you want. I will get the 3.3 develop working again here shortly but I have to first resolve a merge conflict with the old code. Sorry for that. I did not realize that the untested version of the database pool class got merged into the master branches.

bluesnowman commented 12 years ago

I have created a new 3.3 master branch with the reverted connection pool class.

As for the develop branches, I will work on debugging the newly reworked version of the connection pool and commit an updated version soon.