{"action":"created","comment":{"url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/comments/31875640","id":31875640,"diff_hunk":"@@ -1,42 +1,110 @@\n package de.learny.domain;\n \n+import java.util.Collections;\n import java.util.HashSet;\n import java.util.Set;\n \n+import javax.persistence.CascadeType;\n+import javax.persistence.Column;\n import javax.persistence.Entity;\n import javax.persistence.GeneratedValue;\n import javax.persistence.GenerationType;\n import javax.persistence.Id;\n import javax.persistence.ManyToMany;\n+import javax.persistence.ManyToOne;\n import javax.persistence.OneToMany;\n \n import com.fasterxml.jackson.annotation.JsonIgnore;\n+import com.fasterxml.jackson.annotation.JsonProperty;\n+\n \n @Entity\n public class Account {\n-\t\n+\n \t@Id\n \t@GeneratedValue(strategy = GenerationType.AUTO)\n \tprivate long id;\n \n+\t@Column(unique=true)\n \tprivate String accountName;\n-\tprivate String password;\n \t\n-\t@OneToMany(mappedBy=\"account\")\n-\tprivate Set<TestScore> testScores;\n+\tprivate String password, surname, lastname, email, avatarUri;\n+\t\n+\t@ManyToOne\n+\tprivate Role role;\n+\n+\t@OneToMany(mappedBy = \"account\", cascade = CascadeType.ALL, orphanRemoval = true)\n+\tprivate Set<TestScore> testScores = new HashSet<TestScore>();\n+\n+\t@ManyToMany\n+\tprivate Set<Subject> administratedSubjects = new HashSet<Subject>();\n+\t\n+\t@OneToMany\n+\tprivate Set<Achievement> achievements = new HashSet<Achievement>();\n \t\n \t@ManyToMany\n-\tprivate Set<Subject> subjects = new HashSet<Subject>();\n+\tprivate Set <Subject> joinedSubjects = new HashSet<Subject>();\n \n+\t\n \tpublic Account(String accountName, String password) {\n \t\tthis.accountName = accountName;\n \t\tthis.password = password;\n \t}\n-\t\n+\n \tpublic Account() {\n-\t\t\n+\n \t}\n \t\n+\t@JsonIgnore\n+\tpublic String getPassword() {\n+\t\treturn password;\n+\t}\n+\t\n+\t@JsonProperty","path":"src/main/java/de/learny/domain/Account.java","position":70,"original_position":70,"commit_id":"e5478cedef7bcd9d70fe48ac0d1ebe79d729c61a","original_commit_id":"e5478cedef7bcd9d70fe48ac0d1ebe79d729c61a","user":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"body":"JsonProperty sorgt dafür, dass dieses Feld bei einem POST request aus dem JSON ausgelesen werden kann (Wird sonst durch dsa JsonIgnore immer ignoriert)","created_at":"2015-06-07T10:28:08Z","updated_at":"2015-06-07T10:28:08Z","html_url":"https://github.com/andreasgruenh/Learny---Server/pull/10#discussion_r31875640","pull_request_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/comments/31875640"},"html":{"href":"https://github.com/andreasgruenh/Learny---Server/pull/10#discussion_r31875640"},"pull_request":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10","id":37104500,"html_url":"https://github.com/andreasgruenh/Learny---Server/pull/10","diff_url":"https://github.com/andreasgruenh/Learny---Server/pull/10.diff","patch_url":"https://github.com/andreasgruenh/Learny---Server/pull/10.patch","issue_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/10","number":10,"state":"open","locked":false,"title":"Andi","user":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"body":"Richtet die Domainklassen ein und fügt Methoden zum Bearbeiten der Relationen hinzu. Demonstriert das in der Application.java und implementiert die Controller fürs hinzufügen und bearbeiten von accounts.","created_at":"2015-06-07T10:22:23Z","updated_at":"2015-06-07T10:28:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8839622250b59555c857437eed1d64d38f8f991","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10/commits","review_comments_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10/comments","review_comment_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/10/comments","statuses_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/statuses/e5478cedef7bcd9d70fe48ac0d1ebe79d729c61a","head":{"label":"andreasgruenh:andi","ref":"andi","sha":"e5478cedef7bcd9d70fe48ac0d1ebe79d729c61a","user":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"repo":{"id":35330910,"name":"Learny---Server","full_name":"andreasgruenh/Learny---Server","owner":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreasgruenh/Learny---Server","description":"","fork":false,"url":"https://api.github.com/repos/andreasgruenh/Learny---Server","forks_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/forks","keys_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/teams","hooks_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/hooks","issue_events_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/events{/number}","events_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/events","assignees_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/assignees{/user}","branches_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/branches{/branch}","tags_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/tags","blobs_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/statuses/{sha}","languages_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/languages","stargazers_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/stargazers","contributors_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/contributors","subscribers_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/subscribers","subscription_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/subscription","commits_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/contents/{+path}","compare_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/merges","archive_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/downloads","issues_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues{/number}","pulls_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls{/number}","milestones_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/milestones{/number}","notifications_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/labels{/name}","releases_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/releases{/id}","created_at":"2015-05-09T14:09:10Z","updated_at":"2015-05-29T10:09:56Z","pushed_at":"2015-06-07T10:22:23Z","git_url":"git://github.com/andreasgruenh/Learny---Server.git","ssh_url":"git@github.com:andreasgruenh/Learny---Server.git","clone_url":"https://github.com/andreasgruenh/Learny---Server.git","svn_url":"https://github.com/andreasgruenh/Learny---Server","homepage":null,"size":921,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"andreasgruenh:master","ref":"master","sha":"e4b6b5ce35c28932719624ca7c56d95a3ff2d077","user":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"repo":{"id":35330910,"name":"Learny---Server","full_name":"andreasgruenh/Learny---Server","owner":{"login":"andreasgruenh","id":12122390,"avatar_url":"https://avatars.githubusercontent.com/u/12122390?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasgruenh","html_url":"https://github.com/andreasgruenh","followers_url":"https://api.github.com/users/andreasgruenh/followers","following_url":"https://api.github.com/users/andreasgruenh/following{/other_user}","gists_url":"https://api.github.com/users/andreasgruenh/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgruenh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgruenh/subscriptions","organizations_url":"https://api.github.com/users/andreasgruenh/orgs","repos_url":"https://api.github.com/users/andreasgruenh/repos","events_url":"https://api.github.com/users/andreasgruenh/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgruenh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreasgruenh/Learny---Server","description":"","fork":false,"url":"https://api.github.com/repos/andreasgruenh/Learny---Server","forks_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/forks","keys_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/teams","hooks_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/hooks","issue_events_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/events{/number}","events_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/events","assignees_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/assignees{/user}","branches_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/branches{/branch}","tags_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/tags","blobs_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/statuses/{sha}","languages_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/languages","stargazers_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/stargazers","contributors_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/contributors","subscribers_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/subscribers","subscription_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/subscription","commits_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/contents/{+path}","compare_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/merges","archive_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/downloads","issues_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues{/number}","pulls_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls{/number}","milestones_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/milestones{/number}","notifications_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/labels{/name}","releases_url":"https://api.github.com/repos/andreasgruenh/Learny---Server/releases{/id}","created_at":"2015-05-09T14:09:10Z","updated_at":"2015-05-29T10:09:56Z","pushed_at":"2015-06-07T10:22:23Z","git_url":"git://github.com/andreasgruenh/Learny---Server.git","ssh_url":"git@github.com:andreasgruenh/Learny---Server.git","clone_url":"https://github.com/andreasgruenh/Learny---Server.git","svn_url":"https://github.com/andreasgruenh/Learny---Server","homepage":null,"size":921,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10"},"html":{"href":"https://github.com/andreasgruenh/Learny---Server/pull/10"},"issue":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/10"},"comments":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/andreasgruenh/Learny---Server/statuses/e5478cedef7bcd9d70fe48ac0d1ebe79d729c61a"}}}}