{"action":"closed","number":391,"pull_request":{"url":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391","id":72274621,"html_url":"https://github.com/stwe/DatatablesBundle/pull/391","diff_url":"https://github.com/stwe/DatatablesBundle/pull/391.diff","patch_url":"https://github.com/stwe/DatatablesBundle/pull/391.patch","issue_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/391","number":391,"state":"closed","locked":false,"title":"Doctrine Embeddables","user":{"login":"foaly-nr1","id":282458,"avatar_url":"https://avatars.githubusercontent.com/u/282458?v=3","gravatar_id":"","url":"https://api.github.com/users/foaly-nr1","html_url":"https://github.com/foaly-nr1","followers_url":"https://api.github.com/users/foaly-nr1/followers","following_url":"https://api.github.com/users/foaly-nr1/following{/other_user}","gists_url":"https://api.github.com/users/foaly-nr1/gists{/gist_id}","starred_url":"https://api.github.com/users/foaly-nr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foaly-nr1/subscriptions","organizations_url":"https://api.github.com/users/foaly-nr1/orgs","repos_url":"https://api.github.com/users/foaly-nr1/repos","events_url":"https://api.github.com/users/foaly-nr1/events{/privacy}","received_events_url":"https://api.github.com/users/foaly-nr1/received_events","type":"User","site_admin":false},"body":"This bundle doesn't handle Doctrine Embeddables correctly. Example entity:\r\n\r\n```php\r\nuse Doctrine\\ORM\\Mapping as ORM;\r\n\r\n/**\r\n * @ORM\\Entity\r\n * @ORM\\Table\r\n */\r\nclass MyEntity\r\n{\r\n    /**\r\n     * @ORM\\Id\r\n     * @ORM\\Column(type=\"integer\")\r\n     * @ORM\\GeneratedValue(strategy=\"AUTO\")\r\n     */\r\n    private $id;\r\n\r\n    /**\r\n     * @ORM\\Embedded(class=\"DateRange\")\r\n     */\r\n    private $termPeriod;\r\n}\r\n```\r\n\r\nException thrown:\r\n\r\n`Association name expected, \"termPeriod\" is not an association. InvalidArgumentException in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 3044`\r\n\r\nI made a start on fixing this issue and there is no more exception being thrown. The JSON output for an entity with an embedded class looks like this:\r\n\r\n```json\r\n{\r\n\t\"draw\": 1,\r\n\t\"recordsTotal\": 1,\r\n\t\"recordsFiltered\": 1,\r\n\t\"data\": [{\r\n\t\t\"id\": 14,\r\n\t\t\"termPeriod.startDate\": {\r\n\t\t\t\"timezone\": {\r\n\t\t\t\t\"name\": \"Europe\\/London\",\r\n\t\t\t\t\"location\": {\r\n\t\t\t\t\t\"country_code\": \"GB\",\r\n\t\t\t\t\t\"latitude\": 51.50833,\r\n\t\t\t\t\t\"longitude\": -0.12527,\r\n\t\t\t\t\t\"comments\": \"\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"offset\": 3600,\r\n\t\t\t\"timestamp\": 1464822000\r\n\t\t},\r\n\t\t\"termPeriod.endDate\": {\r\n\t\t\t\"timezone\": {\r\n\t\t\t\t\"name\": \"Europe\\/London\",\r\n\t\t\t\t\"location\": {\r\n\t\t\t\t\t\"country_code\": \"GB\",\r\n\t\t\t\t\t\"latitude\": 51.50833,\r\n\t\t\t\t\t\"longitude\": -0.12527,\r\n\t\t\t\t\t\"comments\": \"\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"offset\": 3600,\r\n\t\t\t\"timestamp\": 1466031600\r\n\t\t},\r\n\t}]\r\n}\r\n```\r\n\r\nHowever, because of the way datatables uses dot notation for the `columns.data` option, it won't map the result correctly:\r\n\r\n> `.` - Dotted Javascript notation. Just as you use a `.` in Javascript to read from nested objects, so to can the options specified in `data`. For example: `browser.version` or `browser.name`. If your object parameter name contains a period, use `\\\\` to escape it - i.e. `first\\\\.name`.\r\n\r\n– Source: https://datatables.net/reference/option/columns.data\r\n\r\nNot sure where to go from here.","created_at":"2016-06-02T00:45:23Z","updated_at":"2016-06-08T16:40:55Z","closed_at":"2016-06-08T16:40:55Z","merged_at":null,"merge_commit_sha":"7855ec9d448ea7c9071dee52b3bd917c12948849","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391/commits","review_comments_url":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391/comments","review_comment_url":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/391/comments","statuses_url":"https://api.github.com/repos/stwe/DatatablesBundle/statuses/8822ba720608a7023925627dc1fb51e59897b1ac","head":{"label":"foaly-nr1:patch-embeddables","ref":"patch-embeddables","sha":"8822ba720608a7023925627dc1fb51e59897b1ac","user":{"login":"foaly-nr1","id":282458,"avatar_url":"https://avatars.githubusercontent.com/u/282458?v=3","gravatar_id":"","url":"https://api.github.com/users/foaly-nr1","html_url":"https://github.com/foaly-nr1","followers_url":"https://api.github.com/users/foaly-nr1/followers","following_url":"https://api.github.com/users/foaly-nr1/following{/other_user}","gists_url":"https://api.github.com/users/foaly-nr1/gists{/gist_id}","starred_url":"https://api.github.com/users/foaly-nr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foaly-nr1/subscriptions","organizations_url":"https://api.github.com/users/foaly-nr1/orgs","repos_url":"https://api.github.com/users/foaly-nr1/repos","events_url":"https://api.github.com/users/foaly-nr1/events{/privacy}","received_events_url":"https://api.github.com/users/foaly-nr1/received_events","type":"User","site_admin":false},"repo":{"id":55527805,"name":"DatatablesBundle","full_name":"foaly-nr1/DatatablesBundle","owner":{"login":"foaly-nr1","id":282458,"avatar_url":"https://avatars.githubusercontent.com/u/282458?v=3","gravatar_id":"","url":"https://api.github.com/users/foaly-nr1","html_url":"https://github.com/foaly-nr1","followers_url":"https://api.github.com/users/foaly-nr1/followers","following_url":"https://api.github.com/users/foaly-nr1/following{/other_user}","gists_url":"https://api.github.com/users/foaly-nr1/gists{/gist_id}","starred_url":"https://api.github.com/users/foaly-nr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foaly-nr1/subscriptions","organizations_url":"https://api.github.com/users/foaly-nr1/orgs","repos_url":"https://api.github.com/users/foaly-nr1/repos","events_url":"https://api.github.com/users/foaly-nr1/events{/privacy}","received_events_url":"https://api.github.com/users/foaly-nr1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foaly-nr1/DatatablesBundle","description":"This Bundle integrates the jQuery DataTables plugin into your Symfony application.","fork":true,"url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle","forks_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/forks","keys_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/teams","hooks_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/hooks","issue_events_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/issues/events{/number}","events_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/events","assignees_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/assignees{/user}","branches_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/branches{/branch}","tags_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/tags","blobs_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/languages","stargazers_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/stargazers","contributors_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/contributors","subscribers_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/subscribers","subscription_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/subscription","commits_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/contents/{+path}","compare_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/merges","archive_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/downloads","issues_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/issues{/number}","pulls_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/labels{/name}","releases_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/releases{/id}","deployments_url":"https://api.github.com/repos/foaly-nr1/DatatablesBundle/deployments","created_at":"2016-04-05T17:24:51Z","updated_at":"2016-04-05T17:24:52Z","pushed_at":"2016-06-02T00:33:20Z","git_url":"git://github.com/foaly-nr1/DatatablesBundle.git","ssh_url":"git@github.com:foaly-nr1/DatatablesBundle.git","clone_url":"https://github.com/foaly-nr1/DatatablesBundle.git","svn_url":"https://github.com/foaly-nr1/DatatablesBundle","homepage":"","size":1787,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stwe:master","ref":"master","sha":"a9bc3c88d1f176c27d502e26e520af062993b30b","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},"repo":{"id":10606031,"name":"DatatablesBundle","full_name":"stwe/DatatablesBundle","owner":{"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},"private":false,"html_url":"https://github.com/stwe/DatatablesBundle","description":"This Bundle integrates the jQuery DataTables plugin into your Symfony application.","fork":false,"url":"https://api.github.com/repos/stwe/DatatablesBundle","forks_url":"https://api.github.com/repos/stwe/DatatablesBundle/forks","keys_url":"https://api.github.com/repos/stwe/DatatablesBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stwe/DatatablesBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stwe/DatatablesBundle/teams","hooks_url":"https://api.github.com/repos/stwe/DatatablesBundle/hooks","issue_events_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/events{/number}","events_url":"https://api.github.com/repos/stwe/DatatablesBundle/events","assignees_url":"https://api.github.com/repos/stwe/DatatablesBundle/assignees{/user}","branches_url":"https://api.github.com/repos/stwe/DatatablesBundle/branches{/branch}","tags_url":"https://api.github.com/repos/stwe/DatatablesBundle/tags","blobs_url":"https://api.github.com/repos/stwe/DatatablesBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stwe/DatatablesBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stwe/DatatablesBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/stwe/DatatablesBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stwe/DatatablesBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/stwe/DatatablesBundle/languages","stargazers_url":"https://api.github.com/repos/stwe/DatatablesBundle/stargazers","contributors_url":"https://api.github.com/repos/stwe/DatatablesBundle/contributors","subscribers_url":"https://api.github.com/repos/stwe/DatatablesBundle/subscribers","subscription_url":"https://api.github.com/repos/stwe/DatatablesBundle/subscription","commits_url":"https://api.github.com/repos/stwe/DatatablesBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/stwe/DatatablesBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/stwe/DatatablesBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/stwe/DatatablesBundle/contents/{+path}","compare_url":"https://api.github.com/repos/stwe/DatatablesBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stwe/DatatablesBundle/merges","archive_url":"https://api.github.com/repos/stwe/DatatablesBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stwe/DatatablesBundle/downloads","issues_url":"https://api.github.com/repos/stwe/DatatablesBundle/issues{/number}","pulls_url":"https://api.github.com/repos/stwe/DatatablesBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/stwe/DatatablesBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/stwe/DatatablesBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stwe/DatatablesBundle/labels{/name}","releases_url":"https://api.github.com/repos/stwe/DatatablesBundle/releases{/id}","deployments_url":"https://api.github.com/repos/stwe/DatatablesBundle/deployments","created_at":"2013-06-10T17:47:09Z","updated_at":"2016-06-01T07:36:31Z","pushed_at":"2016-06-08T14:58:26Z","git_url":"git://github.com/stwe/DatatablesBundle.git","ssh_url":"git@github.com:stwe/DatatablesBundle.git","clone_url":"https://github.com/stwe/DatatablesBundle.git","svn_url":"https://github.com/stwe/DatatablesBundle","homepage":"","size":1948,"stargazers_count":123,"watchers_count":123,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":22,"forks":105,"open_issues":22,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391"},"html":{"href":"https://github.com/stwe/DatatablesBundle/pull/391"},"issue":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/issues/391"},"comments":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/issues/391/comments"},"review_comments":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391/comments"},"review_comment":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/pulls/391/commits"},"statuses":{"href":"https://api.github.com/repos/stwe/DatatablesBundle/statuses/8822ba720608a7023925627dc1fb51e59897b1ac"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":7,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"foaly-nr1"}}