{"action":"opened","number":6065,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065","id":29169324,"html_url":"https://github.com/joomla/joomla-cms/pull/6065","diff_url":"https://github.com/joomla/joomla-cms/pull/6065.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/6065.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6065","number":6065,"state":"open","locked":false,"title":"A better way for JTableUser::store to save groups","user":{"login":"Hackwar","id":313866,"avatar_url":"https://avatars.githubusercontent.com/u/313866?v=3","gravatar_id":"","url":"https://api.github.com/users/Hackwar","html_url":"https://github.com/Hackwar","followers_url":"https://api.github.com/users/Hackwar/followers","following_url":"https://api.github.com/users/Hackwar/following{/other_user}","gists_url":"https://api.github.com/users/Hackwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackwar/subscriptions","organizations_url":"https://api.github.com/users/Hackwar/orgs","repos_url":"https://api.github.com/users/Hackwar/repos","events_url":"https://api.github.com/users/Hackwar/events{/privacy}","received_events_url":"https://api.github.com/users/Hackwar/received_events","type":"User","site_admin":false},"body":"This is related to #5144. @jaworskimatt says that he has issues with several instances of Jomsocial writing to the DB at the same time and thus messing up the user-group-mapping table. His proposal was a very complex set of several queries and comparisons. I countered that I rather want that to happen in one query and that that should be possible for our database query class. \r\n\r\nSo I looked at JDatabaseQuery and it exactly states that you can insert more than one row at a time by simply calling JDatabaseQuery::values() several times. I looked at the existing code and saw that it claims that the several different queries are due to cross-database support. I call bullocks on that one. Every serious DBMS out there supports adding more than one row at a time. If there are problems in our implementation regarding this, then it is because of the JDatabaseQuery class of that RDBMS.\r\n\r\nIf, for some strange reason, I'm actually wrong and there is a system out there that does not support several rows in one insert, then we can close this PR, but have to open a new one that changes JDatabaseQuery to make it clear that it can only do one row per insert.\r\n\r\nIn any case, for everything else I refer to #5144","created_at":"2015-02-12T10:56:37Z","updated_at":"2015-02-12T10:56:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/{number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6065/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/e6524306771e4910525fb3ef794d169011bea22f","head":{"label":"Hackwar:patch-29","ref":"patch-29","sha":"e6524306771e4910525fb3ef794d169011bea22f","user":{"login":"Hackwar","id":313866,"avatar_url":"https://avatars.githubusercontent.com/u/313866?v=3","gravatar_id":"","url":"https://api.github.com/users/Hackwar","html_url":"https://github.com/Hackwar","followers_url":"https://api.github.com/users/Hackwar/followers","following_url":"https://api.github.com/users/Hackwar/following{/other_user}","gists_url":"https://api.github.com/users/Hackwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackwar/subscriptions","organizations_url":"https://api.github.com/users/Hackwar/orgs","repos_url":"https://api.github.com/users/Hackwar/repos","events_url":"https://api.github.com/users/Hackwar/events{/privacy}","received_events_url":"https://api.github.com/users/Hackwar/received_events","type":"User","site_admin":false},"repo":{"id":2499669,"name":"joomla-cms","full_name":"Hackwar/joomla-cms","owner":{"login":"Hackwar","id":313866,"avatar_url":"https://avatars.githubusercontent.com/u/313866?v=3","gravatar_id":"","url":"https://api.github.com/users/Hackwar","html_url":"https://github.com/Hackwar","followers_url":"https://api.github.com/users/Hackwar/followers","following_url":"https://api.github.com/users/Hackwar/following{/other_user}","gists_url":"https://api.github.com/users/Hackwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackwar/subscriptions","organizations_url":"https://api.github.com/users/Hackwar/orgs","repos_url":"https://api.github.com/users/Hackwar/repos","events_url":"https://api.github.com/users/Hackwar/events{/privacy}","received_events_url":"https://api.github.com/users/Hackwar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hackwar/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/Hackwar/joomla-cms","forks_url":"https://api.github.com/repos/Hackwar/joomla-cms/forks","keys_url":"https://api.github.com/repos/Hackwar/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hackwar/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hackwar/joomla-cms/teams","hooks_url":"https://api.github.com/repos/Hackwar/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/Hackwar/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/Hackwar/joomla-cms/events","assignees_url":"https://api.github.com/repos/Hackwar/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/Hackwar/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/Hackwar/joomla-cms/tags","blobs_url":"https://api.github.com/repos/Hackwar/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hackwar/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hackwar/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hackwar/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hackwar/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/Hackwar/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/Hackwar/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/Hackwar/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/Hackwar/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/Hackwar/joomla-cms/subscription","commits_url":"https://api.github.com/repos/Hackwar/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hackwar/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hackwar/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hackwar/joomla-cms/issues/comments/{number}","contents_url":"https://api.github.com/repos/Hackwar/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/Hackwar/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hackwar/joomla-cms/merges","archive_url":"https://api.github.com/repos/Hackwar/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hackwar/joomla-cms/downloads","issues_url":"https://api.github.com/repos/Hackwar/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/Hackwar/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/Hackwar/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/Hackwar/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hackwar/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/Hackwar/joomla-cms/releases{/id}","created_at":"2011-10-02T14:42:41Z","updated_at":"2015-01-17T14:15:28Z","pushed_at":"2015-02-12T10:48:04Z","git_url":"git://github.com/Hackwar/joomla-cms.git","ssh_url":"git@github.com:Hackwar/joomla-cms.git","clone_url":"https://github.com/Hackwar/joomla-cms.git","svn_url":"https://github.com/Hackwar/joomla-cms","homepage":"http://joomla.org","size":127497,"stargazers_count":7,"watchers_count":7,"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":7,"default_branch":"master"}},"base":{"label":"joomla:staging","ref":"staging","sha":"54644066b8ae4f1bf95b2d002ebb1148a97800b8","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/{number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","created_at":"2011-09-27T02:07:38Z","updated_at":"2015-02-12T08:20:13Z","pushed_at":"2015-02-12T08:50:32Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"http://joomla.org","size":304447,"stargazers_count":1433,"watchers_count":1433,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1589,"mirror_url":null,"open_issues_count":531,"forks":1589,"open_issues":531,"watchers":1433,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/6065"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/6065"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/6065/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/6065/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/e6524306771e4910525fb3ef794d169011bea22f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":5,"changed_files":1}}