I upgraded my application from Koahana 3.0.1 to Kohana 3.3. It works correctly in Koahana 3.0.1. But, in Kohana 3.3, I'm getting unknown column error. Below is the query I'm using in business model.
$biz = $this->where('business.id','IN',$arr)
->join('users','LEFT')
->select(array('users.id','u'))
->on('users.business_id','=','business.id')
->find_all();
The table names are businesses and users. The model is defined as
class Model_Business extends ORM
The error says -
Database_Exception [ 1054 ]: Unknown column 'businesses.id' in 'where clause'
I could fix this(by updating as above) but, now new error I got is - "Method find() cannot be called on loaded objects".
It looks we can not use find_all() in model itself. In my current project, we return the results from model for all the queries. That means, upgrading will need to change almost all code. Is there any workaround for this ?