{"action":"opened","issue":{"url":"https://api.github.com/repos/bigpresh/Dancer-Plugin-SimpleCRUD/issues/58","repository_url":"https://api.github.com/repos/bigpresh/Dancer-Plugin-SimpleCRUD","labels_url":"https://api.github.com/repos/bigpresh/Dancer-Plugin-SimpleCRUD/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/bigpresh/Dancer-Plugin-SimpleCRUD/issues/58/comments","events_url":"https://api.github.com/repos/bigpresh/Dancer-Plugin-SimpleCRUD/issues/58/events","html_url":"https://github.com/bigpresh/Dancer-Plugin-SimpleCRUD/issues/58","id":169767685,"number":58,"title":"foreign_keys conflicts with edit/:id route?","user":{"login":"joshrabinowitz","id":699993,"avatar_url":"https://avatars.githubusercontent.com/u/699993?v=3","gravatar_id":"","url":"https://api.github.com/users/joshrabinowitz","html_url":"https://github.com/joshrabinowitz","followers_url":"https://api.github.com/users/joshrabinowitz/followers","following_url":"https://api.github.com/users/joshrabinowitz/following{/other_user}","gists_url":"https://api.github.com/users/joshrabinowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshrabinowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshrabinowitz/subscriptions","organizations_url":"https://api.github.com/users/joshrabinowitz/orgs","repos_url":"https://api.github.com/users/joshrabinowitz/repos","events_url":"https://api.github.com/users/joshrabinowitz/events{/privacy}","received_events_url":"https://api.github.com/users/joshrabinowitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-06T21:36:37Z","updated_at":"2016-08-06T21:36:37Z","closed_at":null,"body":"If I set up users, roles and user_roles and suggested, then perform:\r\n\r\n````\r\nsimple_crud( record_title => \"user_roles\", prefix=> \"/admin/user_roles\", db_table=>\"user_roles\", \r\n editable => 1, sortable => 1, paginate => 500, template => 'crud',\r\n                foreign_keys => {\r\n                    role_id => { table => 'roles', key_column => 'id', label_column => 'role', },\r\n                    user_id => { table => 'users', key_column => 'id', label_column => 'handle', },\r\n                });\r\n````\r\n\r\nThen when I attempt to edit or add a new row to user_roles via D:P:SC, I get a 'Query was empty' error: \r\n\r\n````\r\n[16636]  core @0.002779> [hit #7]  --> named tokens are: id in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Route.pm l. 124\r\n[16636] debug @0.003333> [hit #7]Executing SELECT query SELECT * FROM `user_roles` WHERE `id`=? with params 1 in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Plugin/Database.pm l. 28\r\n[16636] debug @0.005090> [hit #7]Looking for rows for foreign relation: {'key_column' => 'id','label_column' => 'handle','table' => 'users'} in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Plugin/SimpleCRUD.pm l. 669\r\n[16636] debug @0.005235> [hit #7]Executing SELECT query  with params  in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Plugin/Database.pm l. 28\r\n[16636] error @0.009021> [hit #7]request to GET /admin/user_roles/edit/1 crashed: DBD::mysql::db selectall_arrayref failed: Query was empty at /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Plugin/Database/Core/Handle.pm line 298. in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Handler.pm l. 98\r\n[16636]  core @0.013953> [hit #7]response: 500 in /opt/perlbrew/perls/perl-5.18.4/lib/site_perl/5.18.4/Dancer/Handler.pm l. 181\r\n````"}}
{"actor":{"display_login":"joshrabinowitz"}}