bgultekin / laravel4-datatables-package

Server-side handler of DataTables Jquery Plugin for Laravel 4
267 stars 108 forks source link

The database connection is default #59

Closed brunobacha closed 10 years ago

brunobacha commented 11 years ago

{"error":{"type":"Exception","message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx_view.logs' doesn't exist (SQL: select count(*) as aggregate from (select id, data, membro_id, texto from logs where (application = ? and controller = ?)) AS count_row_table) (Bindings: array (\n 0 => 'xxx',\n 1 => 'usuarios',\n))","file":"D:\Users\xxx\Documents\xxx\vendor\laravel\framework\src\Illuminate\Database\Connection.php","line":556}}

The model uses $connection = 'xxx_admin' but the connection is pointing to default config "xxx_view". The error started appearing after I updated the plugin Datatables

brunobacha commented 11 years ago

Just to note: I'm using Ardent [https://github.com/laravelbook/ardent]

MarkVaughn commented 11 years ago

OK. Have not considered multiple connections. Can you downgrade to version 1.3.0 in composer I won't be able to check this till Monday

inluxc commented 10 years ago

Yep, i have the same problem, can you fix it???

Thanks in advance, im using 1.3.0 for now.

MarkVaughn commented 10 years ago

@inluxc @brunobacha please test the pull https://github.com/bllim/laravel4-datatables-package/pull/83 and confirm this has fixed the issue.