{"action":"opened","issue":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1453","repository_url":"https://api.github.com/repos/tgriesser/bookshelf","labels_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1453/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1453/comments","events_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1453/events","html_url":"https://github.com/tgriesser/bookshelf/issues/1453","id":190888048,"number":1453,"title":"Database field \"length\" stop results from being returned","user":{"login":"jamesmcminn96","id":3772113,"avatar_url":"https://avatars.githubusercontent.com/u/3772113?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesmcminn96","html_url":"https://github.com/jamesmcminn96","followers_url":"https://api.github.com/users/jamesmcminn96/followers","following_url":"https://api.github.com/users/jamesmcminn96/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcminn96/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcminn96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcminn96/subscriptions","organizations_url":"https://api.github.com/users/jamesmcminn96/orgs","repos_url":"https://api.github.com/users/jamesmcminn96/repos","events_url":"https://api.github.com/users/jamesmcminn96/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcminn96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-22T02:01:43Z","updated_at":"2016-11-22T02:01:43Z","closed_at":null,"body":"Bookshelf version `0.10.0`\r\n\r\nI'm calling `Model().where('id', 1).fetchAll();`\r\n\r\nwhich returns\r\n\r\n```\r\nmethod: 'select',\r\n    options: {},\r\n    timeout: false,\r\n    cancelOnTimeout: false,\r\n    bindings: ['1', 1],\r\n    __knexQueryUid: '85795721-7082-4506-873f-46086f3b29f7',\r\n    sql: 'select `stock_sizes`.* from `stock_sizes` where `id` = ? limit ?'\r\n}\r\nconstructor {\r\n    attributes: {},\r\n    _previousAttributes: {},\r\n    changed: {},\r\n    relations: {},\r\n    cid: 'c1',\r\n    _knex: null\r\n}\r\n```\r\n\r\nMy database has a decimal column named `length`, when that column is deleted, results are returned as expected. I have other decimal columns too so know it isn't an issue with decimal columns. Interestingly too, when the value of the length column is a number i.e. 5, you get this:\r\n\r\n```\r\n{ method: 'select',\r\n  options: {},\r\n  timeout: false,\r\n  cancelOnTimeout: false,\r\n  bindings: [ '1', 1 ],\r\n  __knexQueryUid: '99a3698a-2600-446c-b5dc-43b446edc0ee',\r\n  sql: 'select `stock_sizes`.* from `stock_sizes` where `id` = ? limit ?' }\r\nconstructor {\r\n  attributes: \r\n   { '0': undefined,\r\n     '1': undefined,\r\n     '2': undefined,\r\n     '3': undefined,\r\n     '4': undefined },\r\n  _previousAttributes: \r\n   { '0': undefined,\r\n     '1': undefined,\r\n     '2': undefined,\r\n     '3': undefined,\r\n     '4': undefined },\r\n  changed: {},\r\n  relations: {},\r\n  cid: 'c1',\r\n  _knex: null }\r\n```\r\n\r\nDefinitely looks like an issue with length being a reserved word from Array. "}}
{"actor":{"display_login":"jamesmcminn96"}}