{"action":"closed","issue":{"url":"https://api.github.com/repos/marmelab/ng-admin/issues/558","labels_url":"https://api.github.com/repos/marmelab/ng-admin/issues/558/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/issues/558/comments","events_url":"https://api.github.com/repos/marmelab/ng-admin/issues/558/events","html_url":"https://github.com/marmelab/ng-admin/issues/558","id":94769362,"number":558,"title":"Using MySQL database, boolean values are always displayed as true","user":{"login":"stucki","id":320916,"avatar_url":"https://avatars.githubusercontent.com/u/320916?v=3","gravatar_id":"","url":"https://api.github.com/users/stucki","html_url":"https://github.com/stucki","followers_url":"https://api.github.com/users/stucki/followers","following_url":"https://api.github.com/users/stucki/following{/other_user}","gists_url":"https://api.github.com/users/stucki/gists{/gist_id}","starred_url":"https://api.github.com/users/stucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stucki/subscriptions","organizations_url":"https://api.github.com/users/stucki/orgs","repos_url":"https://api.github.com/users/stucki/repos","events_url":"https://api.github.com/users/stucki/events{/privacy}","received_events_url":"https://api.github.com/users/stucki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-13T17:20:12Z","updated_at":"2015-08-24T16:13:45Z","closed_at":"2015-08-24T16:13:44Z","body":"My data is fetched from a MySQL database where I'm using tinyint(1) for boolean fields. This results in a response like this:\r\n\r\n```\r\n[{\"id\":\"1\",\"title\":\"test1\",\"ensure\":\"1\"},{\"id\":\"2\",\"title\":\"test2\",\"ensure\":\"0\"}]\r\n```\r\n\r\nApparently this does not work because the value \"0\" is evaluated as true. In the list view, both entries are displayed as checked.\r\n\r\nIf I manually set the value to NULL, then it works as expected. However, new rows are again stored with the value \"0\".\r\n\r\nIs this a problem of my database scheme (how to fix it?) or should ng-admin evaluate \"0\" as false?"}}