{"action":"closed","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7591","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7591/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7591/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7591/events","html_url":"https://github.com/cakephp/cakephp/issues/7591","id":112559693,"number":7591,"title":"[3.1] Strange (maybe faulty?) behaviour with contain().","user":{"login":"RaXaR","id":216180,"avatar_url":"https://avatars.githubusercontent.com/u/216180?v=3","gravatar_id":"","url":"https://api.github.com/users/RaXaR","html_url":"https://github.com/RaXaR","followers_url":"https://api.github.com/users/RaXaR/followers","following_url":"https://api.github.com/users/RaXaR/following{/other_user}","gists_url":"https://api.github.com/users/RaXaR/gists{/gist_id}","starred_url":"https://api.github.com/users/RaXaR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaXaR/subscriptions","organizations_url":"https://api.github.com/users/RaXaR/orgs","repos_url":"https://api.github.com/users/RaXaR/repos","events_url":"https://api.github.com/users/RaXaR/events{/privacy}","received_events_url":"https://api.github.com/users/RaXaR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/On%20hold","name":"On hold","color":"eb6420"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/ORM","name":"ORM","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/68","html_url":"https://github.com/cakephp/cakephp/milestones/3.1.6","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/68/labels","id":1434393,"number":68,"title":"3.1.6","description":"Bugfixes and optimizations for the 3.1 branch","creator":{"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},"open_issues":19,"closed_issues":32,"state":"open","created_at":"2015-11-30T03:21:51Z","updated_at":"2015-12-07T02:33:54Z","due_on":"2015-12-22T05:00:00Z","closed_at":null},"comments":3,"created_at":"2015-10-21T10:44:36Z","updated_at":"2015-12-07T02:33:54Z","closed_at":"2015-12-07T02:33:54Z","body":"Hi there :)\r\n I am having a strange issue with contain() and not sure about the cause.\r\n\r\nThe DB: http://pastebin.com/HCxUVtS9\r\nThe AssessmentsTable: http://pastebin.com/CYfFnd2e\r\nThe CustomersTable: http://pastebin.com/Hvk5fRQm\r\n\r\nIn summary, I have Assessments belongsTo Customers belongstTo Companies belongsTo Groups.\r\n\r\nIn CustomersTable::getBaseQuery() everything works fine, but in Assessments::getBaseQuery() I get an erorr that reads: \"Assessments is not associated with Companies\".\r\n\r\nI am not aware that I am trying to join Companies to Assessments anywhere???\r\n\r\nPHP 5.4.25\r\nApache: 2.2.22\r\nMySQL: 5.5.24\r\n\r\nAny assistance would be great.\r\n\r\n"}}