{"action":"opened","number":6116,"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/6116","id":31567167,"html_url":"https://github.com/cakephp/cakephp/pull/6116","diff_url":"https://github.com/cakephp/cakephp/pull/6116.diff","patch_url":"https://github.com/cakephp/cakephp/pull/6116.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6116","number":6116,"state":"open","locked":false,"title":"Added cleanSavaData method - Suggested improvement","user":{"login":"TeckniX","id":33699,"avatar_url":"https://avatars.githubusercontent.com/u/33699?v=3","gravatar_id":"","url":"https://api.github.com/users/TeckniX","html_url":"https://github.com/TeckniX","followers_url":"https://api.github.com/users/TeckniX/followers","following_url":"https://api.github.com/users/TeckniX/following{/other_user}","gists_url":"https://api.github.com/users/TeckniX/gists{/gist_id}","starred_url":"https://api.github.com/users/TeckniX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeckniX/subscriptions","organizations_url":"https://api.github.com/users/TeckniX/orgs","repos_url":"https://api.github.com/users/TeckniX/repos","events_url":"https://api.github.com/users/TeckniX/events{/privacy}","received_events_url":"https://api.github.com/users/TeckniX/received_events","type":"User","site_admin":false},"body":"The book makes a small mention of the DB schema:\r\n`When defining fields for TranslateBehavior to translate, be sure to omit those fields from the translated model’s schema. If you leave the fields in, there can be issues when retrieving data with fallback locales.`\r\n\r\nThe issue is that if the model's schema has those fields, it will try to update them for whatever current language is selected. The above patch allows for only the 'default' language, as defined by `Config.language`, to be saved back into the model. If another language is selected at the time of the save, then the model's schema will not be updated with the data. Only the translate table data will be.","created_at":"2015-03-19T21:17:48Z","updated_at":"2015-03-19T21:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/6116/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/6116/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6116/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/08274bd7911fcfbaa681469bd60f605c4444aa80","head":{"label":"TeckniX:patch-1","ref":"patch-1","sha":"08274bd7911fcfbaa681469bd60f605c4444aa80","user":{"login":"TeckniX","id":33699,"avatar_url":"https://avatars.githubusercontent.com/u/33699?v=3","gravatar_id":"","url":"https://api.github.com/users/TeckniX","html_url":"https://github.com/TeckniX","followers_url":"https://api.github.com/users/TeckniX/followers","following_url":"https://api.github.com/users/TeckniX/following{/other_user}","gists_url":"https://api.github.com/users/TeckniX/gists{/gist_id}","starred_url":"https://api.github.com/users/TeckniX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeckniX/subscriptions","organizations_url":"https://api.github.com/users/TeckniX/orgs","repos_url":"https://api.github.com/users/TeckniX/repos","events_url":"https://api.github.com/users/TeckniX/events{/privacy}","received_events_url":"https://api.github.com/users/TeckniX/received_events","type":"User","site_admin":false},"repo":{"id":32535030,"name":"cakephp","full_name":"TeckniX/cakephp","owner":{"login":"TeckniX","id":33699,"avatar_url":"https://avatars.githubusercontent.com/u/33699?v=3","gravatar_id":"","url":"https://api.github.com/users/TeckniX","html_url":"https://github.com/TeckniX","followers_url":"https://api.github.com/users/TeckniX/followers","following_url":"https://api.github.com/users/TeckniX/following{/other_user}","gists_url":"https://api.github.com/users/TeckniX/gists{/gist_id}","starred_url":"https://api.github.com/users/TeckniX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeckniX/subscriptions","organizations_url":"https://api.github.com/users/TeckniX/orgs","repos_url":"https://api.github.com/users/TeckniX/repos","events_url":"https://api.github.com/users/TeckniX/events{/privacy}","received_events_url":"https://api.github.com/users/TeckniX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TeckniX/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":true,"url":"https://api.github.com/repos/TeckniX/cakephp","forks_url":"https://api.github.com/repos/TeckniX/cakephp/forks","keys_url":"https://api.github.com/repos/TeckniX/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeckniX/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeckniX/cakephp/teams","hooks_url":"https://api.github.com/repos/TeckniX/cakephp/hooks","issue_events_url":"https://api.github.com/repos/TeckniX/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/TeckniX/cakephp/events","assignees_url":"https://api.github.com/repos/TeckniX/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/TeckniX/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/TeckniX/cakephp/tags","blobs_url":"https://api.github.com/repos/TeckniX/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeckniX/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeckniX/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeckniX/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeckniX/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/TeckniX/cakephp/languages","stargazers_url":"https://api.github.com/repos/TeckniX/cakephp/stargazers","contributors_url":"https://api.github.com/repos/TeckniX/cakephp/contributors","subscribers_url":"https://api.github.com/repos/TeckniX/cakephp/subscribers","subscription_url":"https://api.github.com/repos/TeckniX/cakephp/subscription","commits_url":"https://api.github.com/repos/TeckniX/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeckniX/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeckniX/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeckniX/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeckniX/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/TeckniX/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeckniX/cakephp/merges","archive_url":"https://api.github.com/repos/TeckniX/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeckniX/cakephp/downloads","issues_url":"https://api.github.com/repos/TeckniX/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/TeckniX/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/TeckniX/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/TeckniX/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeckniX/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/TeckniX/cakephp/releases{/id}","created_at":"2015-03-19T17:02:35Z","updated_at":"2015-03-19T17:02:43Z","pushed_at":"2015-03-19T21:17:26Z","git_url":"git://github.com/TeckniX/cakephp.git","ssh_url":"git@github.com:TeckniX/cakephp.git","clone_url":"https://github.com/TeckniX/cakephp.git","svn_url":"https://github.com/TeckniX/cakephp","homepage":"http://cakephp.org","size":155681,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cakephp:2.7","ref":"2.7","sha":"8cadb553d7bd8706c6013ab7db12913cea9cf5d0","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","created_at":"2010-05-08T14:38:22Z","updated_at":"2015-03-19T17:35:51Z","pushed_at":"2015-03-19T21:15:30Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":155681,"stargazers_count":5575,"watchers_count":5575,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2502,"mirror_url":null,"open_issues_count":127,"forks":2502,"open_issues":127,"watchers":5575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6116"},"html":{"href":"https://github.com/cakephp/cakephp/pull/6116"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/6116"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/6116/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6116/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/6116/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/08274bd7911fcfbaa681469bd60f605c4444aa80"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":25,"deletions":0,"changed_files":1}}