{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/dbal/issues/910","repository_url":"https://api.github.com/repos/doctrine/dbal","labels_url":"https://api.github.com/repos/doctrine/dbal/issues/910/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/910/comments","events_url":"https://api.github.com/repos/doctrine/dbal/issues/910/events","html_url":"https://github.com/doctrine/dbal/pull/910","id":107334701,"number":910,"title":"Add IBM DB2 iSeries support","user":{"login":"cassvail","id":9960733,"avatar_url":"https://avatars.githubusercontent.com/u/9960733?v=3","gravatar_id":"","url":"https://api.github.com/users/cassvail","html_url":"https://github.com/cassvail","followers_url":"https://api.github.com/users/cassvail/followers","following_url":"https://api.github.com/users/cassvail/following{/other_user}","gists_url":"https://api.github.com/users/cassvail/gists{/gist_id}","starred_url":"https://api.github.com/users/cassvail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cassvail/subscriptions","organizations_url":"https://api.github.com/users/cassvail/orgs","repos_url":"https://api.github.com/users/cassvail/repos","events_url":"https://api.github.com/users/cassvail/events{/privacy}","received_events_url":"https://api.github.com/users/cassvail/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doctrine/dbal/labels/DB2","name":"DB2","color":"c7def8"},{"url":"https://api.github.com/repos/doctrine/dbal/labels/In%20Review","name":"In Review","color":"eb6420"},{"url":"https://api.github.com/repos/doctrine/dbal/labels/New%20Feature","name":"New Feature","color":"5319e7"},{"url":"https://api.github.com/repos/doctrine/dbal/labels/Platforms","name":"Platforms","color":"bfe5bf"},{"url":"https://api.github.com/repos/doctrine/dbal/labels/Schema%20Managers","name":"Schema Managers","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-19T13:56:19Z","updated_at":"2016-04-04T15:31:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/910","html_url":"https://github.com/doctrine/dbal/pull/910","diff_url":"https://github.com/doctrine/dbal/pull/910.diff","patch_url":"https://github.com/doctrine/dbal/pull/910.patch"},"body":"IBM iSeries DB2 has a lot of differences from the linux version.\r\nThis set of commits gets dbal and even base functionalities of doctrine-orm to work on IBMi systems without breaking the base set of DB2 classes."},"comment":{"url":"https://api.github.com/repos/doctrine/dbal/issues/comments/205351776","html_url":"https://github.com/doctrine/dbal/pull/910#issuecomment-205351776","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/910","id":205351776,"user":{"login":"asgrim","id":496145,"avatar_url":"https://avatars.githubusercontent.com/u/496145?v=3","gravatar_id":"","url":"https://api.github.com/users/asgrim","html_url":"https://github.com/asgrim","followers_url":"https://api.github.com/users/asgrim/followers","following_url":"https://api.github.com/users/asgrim/following{/other_user}","gists_url":"https://api.github.com/users/asgrim/gists{/gist_id}","starred_url":"https://api.github.com/users/asgrim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asgrim/subscriptions","organizations_url":"https://api.github.com/users/asgrim/orgs","repos_url":"https://api.github.com/users/asgrim/repos","events_url":"https://api.github.com/users/asgrim/events{/privacy}","received_events_url":"https://api.github.com/users/asgrim/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T15:31:02Z","updated_at":"2016-04-04T15:31:02Z","body":"@cassvail I have a problem with a column in the `ORDER BY` not bubbling up correctly:\r\n\r\n```\r\nSELECT DOCTRINE_TBL.*\r\nFROM (\r\n  SELECT DOCTRINE_TBL1.*, ROW_NUMBER() OVER(ORDER BY m1_.date_created DESC) AS DOCTRINE_ROWNUM\r\n  FROM (\r\n    SELECT m0_.id AS ID_0, m0_.answer_index AS ANSWER_INDEX_1, m0_.answer_value AS ANSWER_VALUE_2, m0_.submission_id AS SUBMISSION_ID_3, m0_.question_element_id AS QUESTION_ELEMENT_ID_4\r\n    FROM MEDICAL_FORM_ANSWER m0_\r\n      INNER JOIN MEDICAL_FORM_SUBMISSION m1_ ON (m0_.submission_id = m1_.id)\r\n      INNER JOIN PERSON p2_ ON (m1_.person_id = p2_.id)\r\n    WHERE p2_.application_id = ?\r\n      AND m0_.question_element_id = ?\r\n      AND m0_.answer_index = ?\r\n    ORDER BY m1_.date_created DESC\r\n  ) DOCTRINE_TBL1\r\n) DOCTRINE_TBL\r\nWHERE DOCTRINE_TBL.DOCTRINE_ROWNUM BETWEEN 1 AND 1\r\n```\r\n\r\nThe error I see is:\r\n\r\n```\r\nSQLSTATE=42703 SQLCODE=-206 Column or global variable DATE_CREATED not found.\r\n```\r\n\r\nI'm able to fix manually by changing `OVER(ORDER BY DOCTRINE_TBL1.date_created DESC)` and adding `m1_.date_created` to the innermost `SELECT`, but I'm not sure how to implement this cleanly into your `doModifyLimitQuery` method, as it would involve modifying the innertmost `$query` provided... additionally, if I do a fetch-join (to force `m1_` to be included in the select), the column name becomes aliased as `DATE_CREATED_4` which makes it actually more complex :/ any suggestions?"}}