{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/12968","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/12968/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/12968/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/12968/events","html_url":"https://github.com/yiisoft/yii2/issues/12968","id":188634974,"number":12968,"title":"Activedataprovider set limit inside of query with union but should outside","user":{"login":"tunforjob","id":5564697,"avatar_url":"https://avatars3.githubusercontent.com/u/5564697?v=4","gravatar_id":"","url":"https://api.github.com/users/tunforjob","html_url":"https://github.com/tunforjob","followers_url":"https://api.github.com/users/tunforjob/followers","following_url":"https://api.github.com/users/tunforjob/following{/other_user}","gists_url":"https://api.github.com/users/tunforjob/gists{/gist_id}","starred_url":"https://api.github.com/users/tunforjob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunforjob/subscriptions","organizations_url":"https://api.github.com/users/tunforjob/orgs","repos_url":"https://api.github.com/users/tunforjob/repos","events_url":"https://api.github.com/users/tunforjob/events{/privacy}","received_events_url":"https://api.github.com/users/tunforjob/received_events","type":"User","site_admin":false},"labels":[{"id":115010082,"url":"https://api.github.com/repos/yiisoft/yii2/labels/feature:db","name":"feature:db","color":"bfd4f2","default":false},{"id":33330247,"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:ready%20for%20adoption","name":"status:ready for adoption","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/29","html_url":"https://github.com/yiisoft/yii2/milestone/29","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/29/labels","id":2999535,"number":29,"title":"2.1.1","description":"","creator":{"login":"samdark","id":47294,"avatar_url":"https://avatars2.githubusercontent.com/u/47294?v=4","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"open_issues":125,"closed_issues":4,"state":"open","created_at":"2017-12-27T11:50:11Z","updated_at":"2018-05-20T01:24:37Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-11-10T22:23:52Z","updated_at":"2018-05-22T13:47:01Z","closed_at":null,"author_association":"NONE","body":"### What steps will reproduce the problem?\r\n```php\r\n$query = Product::find()->where(['id' => 1]);\r\n$query2 = Product::find()->where(['id' => 2]);\r\n$query-> union($query2);\r\n$provider = new ActiveDataProvider([\r\n'query' => $query,\r\n    'pagination' => [\r\n        'pageSize' => 12,\r\n    ],\r\n]);\r\n$provider->getModels();\r\n```\r\n### What is the expected result?\r\n(SELECT * FROM `product` WHERE `id`=1) UNION ( SELECT * FROM `product` WHERE `id`=2 ) LIMIT 12\r\n### What do you get instead?\r\n(SELECT * FROM `product` WHERE `id`=1 LIMIT 12) UNION ( SELECT * FROM `product` WHERE `id`=2 )\r\n\r\n### Additional info\r\n\r\n| Q                | A\r\n| ---------------- | ---\r\n| Yii version      | 2.0.?\r\n| PHP version      |\r\n| Operating system |\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/390996191","html_url":"https://github.com/yiisoft/yii2/issues/12968#issuecomment-390996191","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/12968","id":390996191,"user":{"login":"skvarovski","id":11178969,"avatar_url":"https://avatars2.githubusercontent.com/u/11178969?v=4","gravatar_id":"","url":"https://api.github.com/users/skvarovski","html_url":"https://github.com/skvarovski","followers_url":"https://api.github.com/users/skvarovski/followers","following_url":"https://api.github.com/users/skvarovski/following{/other_user}","gists_url":"https://api.github.com/users/skvarovski/gists{/gist_id}","starred_url":"https://api.github.com/users/skvarovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skvarovski/subscriptions","organizations_url":"https://api.github.com/users/skvarovski/orgs","repos_url":"https://api.github.com/users/skvarovski/repos","events_url":"https://api.github.com/users/skvarovski/events{/privacy}","received_events_url":"https://api.github.com/users/skvarovski/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T13:47:01Z","updated_at":"2018-05-22T13:47:01Z","author_association":"NONE","body":"problev actualy!!! \r\nthanks for patch @m2fik"}}
{"actor":{"display_login":"skvarovski"}}