{"action":"created","issue":{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/47","repository_url":"https://api.github.com/repos/adonisjs/adonis-lucid","labels_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/47/comments","events_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/47/events","html_url":"https://github.com/adonisjs/adonis-lucid/pull/47","id":173744845,"number":47,"title":"Added test for SQLITE_MISUSE exception.","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":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-29T10:32:41Z","updated_at":"2016-08-29T17:16:28Z","closed_at":"2016-08-29T17:16:28Z","pull_request":{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/pulls/47","html_url":"https://github.com/adonisjs/adonis-lucid/pull/47","diff_url":"https://github.com/adonisjs/adonis-lucid/pull/47.diff","patch_url":"https://github.com/adonisjs/adonis-lucid/pull/47.patch"},"body":"When running with `DB=sqlite3` new test failing."},"comment":{"url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/comments/243189539","html_url":"https://github.com/adonisjs/adonis-lucid/pull/47#issuecomment-243189539","issue_url":"https://api.github.com/repos/adonisjs/adonis-lucid/issues/47","id":243189539,"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-29T17:16:28Z","updated_at":"2016-08-29T17:16:28Z","body":"@arma-gast There are couple of things here.\r\n\r\n1. `sync` method has a bug, where it does not pass attributes to the `detach` method.\r\n2. If u pass an empty array to the `detach` method, I want it to fail instead of handling the situation internally and here's why.\r\n\r\nThe domain layer should be transparent, which means your code should do have a `if` check and make sure only to call the `sync` method, when there are values. It makes the entire program more logical as you can see right into your code that your controller is expecting an empty array too. Whereas swallowing the empty array internally by the array leads to bad and hidden design.\r\n\r\nOf course you can keep your controllers thin my extracting the logic to different Services.\r\n\r\n## Finally\r\n\r\nI am happy to accept the PR for `sync` method and closing this one."}}
{"actor":{"display_login":"thetutlage"}}