{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5584","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5584/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5584/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5584/events","html_url":"https://github.com/cakephp/cakephp/issues/5584","id":53517132,"number":5584,"title":"3.x matching() overwrites contain()","user":{"login":"davidyell","id":49889,"avatar_url":"https://avatars.githubusercontent.com/u/49889?v=3","gravatar_id":"","url":"https://api.github.com/users/davidyell","html_url":"https://github.com/davidyell","followers_url":"https://api.github.com/users/davidyell/followers","following_url":"https://api.github.com/users/davidyell/following{/other_user}","gists_url":"https://api.github.com/users/davidyell/gists{/gist_id}","starred_url":"https://api.github.com/users/davidyell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidyell/subscriptions","organizations_url":"https://api.github.com/users/davidyell/orgs","repos_url":"https://api.github.com/users/davidyell/repos","events_url":"https://api.github.com/users/davidyell/events{/privacy}","received_events_url":"https://api.github.com/users/davidyell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/ORM","name":"ORM","color":"ffffff"}],"state":"open","locked":false,"assignee":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/7/labels","id":453043,"number":7,"title":"3.0.0","description":"New major release that breaks compatibility with 2.x\r\n\r\n- PHP5.4.19+\r\n- New ORM & behaviors.\r\n- Improved Routing\r\n- PSR-0 and composer support.\r\n- Simpler configuration and bootstrapping.\r\n- Improved configuration handling.\r\n- Improved bake.\r\n\r\nSee [the roadmap](http://github.com/cakephp/cakephp/wiki/3.0-roadmap) for more details.","creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":2108,"state":"open","created_at":"2013-10-11T20:56:23Z","updated_at":"2015-01-08T21:44:20Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-01-06T14:00:53Z","updated_at":"2015-01-08T22:58:13Z","closed_at":null,"body":"**Scenario**\r\nA recent update to the core seems to have broken some of my finds. The affect being to me at least that using `matching()` whilst also having a `contain()` in your find will cause only the tables in `matching()` to be returned in the query, and not the ones in `contain()`.\r\n\r\n**TL;DR**\r\nHere are two examples of my find, with an extra `matching()` call and without.\r\nhttps://gist.github.com/davidyell/6b3d029815accca7197c\r\nhttps://gist.github.com/davidyell/962a5615037385cfeeb3\r\n\r\nI also have another find which suffers from the same issue.\r\n\r\nSo if you contain `Posts` and `Tags` but then using `matching('Posts')` the return will be `Posts.tags = null`, unless you add another `matching('Posts.Tags')`"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/69265742","html_url":"https://github.com/cakephp/cakephp/issues/5584#issuecomment-69265742","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/5584","id":69265742,"user":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T22:58:13Z","updated_at":"2015-01-08T22:58:13Z","body":"Thanks @ndm, I'll take a look."}}