j4mie/idiorm — pull request #197 by kendru (2014-05-06 15:57:36+00:00)
Title: Correct issue #176: Ensure database setup before building select

It appears that when not explicitly setting the database connection via `ORM::set_db()`, calling `ORM::for_table()` would not set up the database explicitly. This caused a situation where the database was getting set after the select statement was built, causing the limit clause to be built incorrectly. I also modified the existing test to accurately reflect the situation where this bug appeared.