{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2","id":31899317,"html_url":"https://github.com/antonio-pierro/reverse-engineering-showcase/pull/2","diff_url":"https://github.com/antonio-pierro/reverse-engineering-showcase/pull/2.diff","patch_url":"https://github.com/antonio-pierro/reverse-engineering-showcase/pull/2.patch","issue_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/2","number":2,"state":"closed","locked":false,"title":"MultimediaModelBundle","user":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"body":"This PR aims at adding the Multimedia Model Bundle, the layer which interacts with the database.\r\nWe don't need router because it does not have to respond to any http request.\r\n\r\n    > php app/console generate:bundle\r\n    Bundle namespace: Application/Multimedia/ModelBundle\r\n    Bundle name: MultimediaModelBundle\r\n    Target directory: <default>\r\n    Configuration format: annotation\r\n    Do you want to generate the whole directory structure: no\r\n    Do you confirm generation: yes\r\n    Confirm automatic update of your Kernel: yes\r\n    Confirm automatic update of the Routing: no\r\n\r\nYou can delete the `ModelBundle/Controller` and `Resources/views`\r\n\r\n##### Generate Entities from an Existing Database\r\n\r\nLet's create a database with the the follwoing relationships:\r\n\r\n    CREATE TABLE customers (\r\n        customer_id INT AUTO_INCREMENT PRIMARY KEY,\r\n        customer_name VARCHAR(100)\r\n    );\r\n\r\n    CREATE TABLE orders (\r\n        order_id INT AUTO_INCREMENT PRIMARY KEY,\r\n        customer_id INT,\r\n        amount DOUBLE,\r\n        FOREIGN KEY (customer_id) REFERENCES customers(customer_id)\r\n    ); \r\n\r\nLet's ask Doctrine to introspect the database and generate the corresponding metadata files:\r\n\r\n    > php app/console doctrine:mapping:import --force MultimediaModelBundle xml\r\n\r\n Let's ask Doctrine to build related entity classes by executing the following two commands:\r\n\r\n    > php app/console doctrine:generate:entities MultimediaModelBundle\r\n\r\n##### Database migration:\r\n\r\nLet's suppose the `customers` and `orders` table do not exist:\r\n\r\n    mysql> select * from customers;\r\n    ERROR 1146 (42S02): Table 're_db.customers' doesn't exist\r\n\r\n    > php app/console doctrine:migrations:diff\r\n    > php app/console doctrine:migrations:status --show-versions\r\n    > php app/console doctrine:migrations:migrate 20150325094851\r\n\r\n    mysql> select * from customers;\r\n    Empty set (0.00 sec)\r\n\r\n    > php app/console doctrine:migrations:migrate  prev\r\n\r\n    mysql> select * from customers;\r\n    ERROR 1146 (42S02): Table 're_db.customers' doesn't exist\r\n\r\n    > php app/console doctrine:migrations:migrate 20150325094851\r\n\r\n#### References:\r\n\r\n[Reverse Engineering](http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html)","created_at":"2015-03-25T07:42:16Z","updated_at":"2015-03-25T09:13:26Z","closed_at":"2015-03-25T09:13:25Z","merged_at":"2015-03-25T09:13:25Z","merge_commit_sha":"c900097f6c11cf5a112de9a70af33967176d3a6a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2/commits","review_comments_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2/comments","review_comment_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/2/comments","statuses_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/statuses/3645b5a18778f3ea3be12c165f3db534d78c9df4","head":{"label":"antonio-pierro:multimedia-model-bundle","ref":"multimedia-model-bundle","sha":"3645b5a18778f3ea3be12c165f3db534d78c9df4","user":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"repo":{"id":32573651,"name":"reverse-engineering-showcase","full_name":"antonio-pierro/reverse-engineering-showcase","owner":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antonio-pierro/reverse-engineering-showcase","description":"","fork":false,"url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase","forks_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/forks","keys_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/teams","hooks_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/hooks","issue_events_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/events","assignees_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/tags","blobs_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/languages","stargazers_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/stargazers","contributors_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/contributors","subscribers_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/subscribers","subscription_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/subscription","commits_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/merges","archive_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/downloads","issues_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/labels{/name}","releases_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/releases{/id}","created_at":"2015-03-20T09:02:08Z","updated_at":"2015-03-25T07:28:08Z","pushed_at":"2015-03-25T09:13:25Z","git_url":"git://github.com/antonio-pierro/reverse-engineering-showcase.git","ssh_url":"git@github.com:antonio-pierro/reverse-engineering-showcase.git","clone_url":"https://github.com/antonio-pierro/reverse-engineering-showcase.git","svn_url":"https://github.com/antonio-pierro/reverse-engineering-showcase","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"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":"antonio-pierro:master","ref":"master","sha":"b4e4a69affe919d751a7ccca8fa5e4872c4bf35b","user":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"repo":{"id":32573651,"name":"reverse-engineering-showcase","full_name":"antonio-pierro/reverse-engineering-showcase","owner":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antonio-pierro/reverse-engineering-showcase","description":"","fork":false,"url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase","forks_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/forks","keys_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/teams","hooks_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/hooks","issue_events_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/events","assignees_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/tags","blobs_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/languages","stargazers_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/stargazers","contributors_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/contributors","subscribers_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/subscribers","subscription_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/subscription","commits_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/merges","archive_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/downloads","issues_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/labels{/name}","releases_url":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/releases{/id}","created_at":"2015-03-20T09:02:08Z","updated_at":"2015-03-25T07:28:08Z","pushed_at":"2015-03-25T09:13:25Z","git_url":"git://github.com/antonio-pierro/reverse-engineering-showcase.git","ssh_url":"git@github.com:antonio-pierro/reverse-engineering-showcase.git","clone_url":"https://github.com/antonio-pierro/reverse-engineering-showcase.git","svn_url":"https://github.com/antonio-pierro/reverse-engineering-showcase","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2"},"html":{"href":"https://github.com/antonio-pierro/reverse-engineering-showcase/pull/2"},"issue":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/2"},"comments":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/antonio-pierro/reverse-engineering-showcase/statuses/3645b5a18778f3ea3be12c165f3db534d78c9df4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"antonio-pierro","id":1194257,"avatar_url":"https://avatars.githubusercontent.com/u/1194257?v=3","gravatar_id":"","url":"https://api.github.com/users/antonio-pierro","html_url":"https://github.com/antonio-pierro","followers_url":"https://api.github.com/users/antonio-pierro/followers","following_url":"https://api.github.com/users/antonio-pierro/following{/other_user}","gists_url":"https://api.github.com/users/antonio-pierro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonio-pierro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonio-pierro/subscriptions","organizations_url":"https://api.github.com/users/antonio-pierro/orgs","repos_url":"https://api.github.com/users/antonio-pierro/repos","events_url":"https://api.github.com/users/antonio-pierro/events{/privacy}","received_events_url":"https://api.github.com/users/antonio-pierro/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":4,"additions":312,"deletions":0,"changed_files":11}}