{"action":"created","issue":{"url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/352","repository_url":"https://api.github.com/repos/stwe/DatatablesBundle","labels_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/352/comments","events_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/352/events","html_url":"https://github.com/stwe/DatatablesBundle/issues/352","id":152767349,"number":352,"title":"Bug with 3 relations many-to-one","user":{"login":"greg-avanim","id":19168840,"avatar_url":"https://avatars.githubusercontent.com/u/19168840?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-avanim","html_url":"https://github.com/greg-avanim","followers_url":"https://api.github.com/users/greg-avanim/followers","following_url":"https://api.github.com/users/greg-avanim/following{/other_user}","gists_url":"https://api.github.com/users/greg-avanim/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-avanim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-avanim/subscriptions","organizations_url":"https://api.github.com/users/greg-avanim/orgs","repos_url":"https://api.github.com/users/greg-avanim/repos","events_url":"https://api.github.com/users/greg-avanim/events{/privacy}","received_events_url":"https://api.github.com/users/greg-avanim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stwe/DatatablesBundle/labels/can't%20reproduce","name":"can't reproduce","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-05-03T13:01:08Z","updated_at":"2016-05-08T15:29:15Z","closed_at":null,"body":"Hi,\r\n\r\nOn v0.10, there's a bug when we access an attribute by 3 relations many-to-one (or one-to-one).\r\nFor example, in datatable class, a column named entity1.entity2.entity3.attribute.\r\n\r\nI've corrected this bug in function setupColumnArrays of DatatableQuery class by replacing at line 263\r\n\r\n$join = str_replace('_', '.', $select);\r\n\r\nby\r\n\r\n$lastSeparatorIndex = strrpos($select, '_');\r\n$join = substr($select, 0, $lastSeparatorIndex) . '.' . substr($select, $lastSeparatorIndex + 1);\r\n\r\nCan I suggest that you apply this code please ?\r\nI really need this asap.\r\nThank you,\r\n\r\nGreg"},"comment":{"url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/comments/217727067","html_url":"https://github.com/stwe/DatatablesBundle/issues/352#issuecomment-217727067","issue_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/352","id":217727067,"user":{"login":"stwe","id":2964748,"avatar_url":"https://avatars.githubusercontent.com/u/2964748?v=3","gravatar_id":"","url":"https://api.github.com/users/stwe","html_url":"https://github.com/stwe","followers_url":"https://api.github.com/users/stwe/followers","following_url":"https://api.github.com/users/stwe/following{/other_user}","gists_url":"https://api.github.com/users/stwe/gists{/gist_id}","starred_url":"https://api.github.com/users/stwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stwe/subscriptions","organizations_url":"https://api.github.com/users/stwe/orgs","repos_url":"https://api.github.com/users/stwe/repos","events_url":"https://api.github.com/users/stwe/events{/privacy}","received_events_url":"https://api.github.com/users/stwe/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T15:29:15Z","updated_at":"2016-05-08T15:29:15Z","body":"Absolutely strange. With your entities I get actually an error message. I have an own example: Chili -> Heat ->User->Post run as expected. At the moment I do not know what happens there."}}