{"action":"created","issue":{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/46","repository_url":"https://api.github.com/repos/adonisjs/adonis-lucid","labels_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/46/comments","events_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/46/events","html_url":"https://github.com/adonisjs/adonis-lucid/issues/46","id":173644220,"number":46,"title":"SQLITE_MISUSE: not an error","user":{"login":"arma-gast","id":6592298,"avatar_url":"https://avatars.githubusercontent.com/u/6592298?v=3","gravatar_id":"","url":"https://api.github.com/users/arma-gast","html_url":"https://github.com/arma-gast","followers_url":"https://api.github.com/users/arma-gast/followers","following_url":"https://api.github.com/users/arma-gast/following{/other_user}","gists_url":"https://api.github.com/users/arma-gast/gists{/gist_id}","starred_url":"https://api.github.com/users/arma-gast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arma-gast/subscriptions","organizations_url":"https://api.github.com/users/arma-gast/orgs","repos_url":"https://api.github.com/users/arma-gast/repos","events_url":"https://api.github.com/users/arma-gast/events{/privacy}","received_events_url":"https://api.github.com/users/arma-gast/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-28T12:24:33Z","updated_at":"2016-08-29T18:43:55Z","closed_at":null,"body":"When I trying to perform .sync on belongsToMany relation with empty array, I get SQLITE_MISUSE: not an error exception. What am I doing wrong?"},"comment":{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/comments/243216065","html_url":"https://github.com/adonisjs/adonis-lucid/issues/46#issuecomment-243216065","issue_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/46","id":243216065,"user":{"login":"thetutlage","id":1706381,"avatar_url":"https://avatars.githubusercontent.com/u/1706381?v=3","gravatar_id":"","url":"https://api.github.com/users/thetutlage","html_url":"https://github.com/thetutlage","followers_url":"https://api.github.com/users/thetutlage/followers","following_url":"https://api.github.com/users/thetutlage/following{/other_user}","gists_url":"https://api.github.com/users/thetutlage/gists{/gist_id}","starred_url":"https://api.github.com/users/thetutlage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetutlage/subscriptions","organizations_url":"https://api.github.com/users/thetutlage/orgs","repos_url":"https://api.github.com/users/thetutlage/repos","events_url":"https://api.github.com/users/thetutlage/events{/privacy}","received_events_url":"https://api.github.com/users/thetutlage/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T18:43:55Z","updated_at":"2016-08-29T18:43:55Z","body":"Ohh yeah `sync` is working as expected. (My bad)\r\n\r\nWith `detach` it is more of a design question than the implementation question.\r\n\r\nIt will be over responsibility of `detach` method to do the right thing inside a black box, whereas right now the expectations are clear. When you pass an array it should have values otherwise it will remove all the references. \r\n\r\nWith an empty check on the array, the layer will become too complicated. If there is an array remove selected, if array is empty do nothing and if there is no parameter passed remove everything. Which gives me less confidence on what really is going to happen with the detach method.\r\n\r\nIt should be the end user responsibility to handle the domain logic and try to be as explicit as possible within the code."}}
{"actor":{"display_login":"thetutlage"}}