{"action":"created","comment":{"url":"https://api.github.com/repos/outworkers/phantom/pulls/comments/55693340","id":55693340,"diff_hunk":"@@ -189,25 +189,24 @@ abstract class CassandraTable[T <: CassandraTable[T, R], R] extends SelectTable[\n     }\n   }\n \n-  Lock.synchronized {\n+  val columns: Seq[AbstractColumn[_]] = Lock.synchronized {\n \n-    val instanceMirror = cm.reflect(this)\n     val selfType = instanceMirror.symbol.toType\n \n-    // Collect all column definitions starting from base class\n-    val columnMembers = MutableArrayBuffer.empty[Symbol]\n-    selfType.baseClasses.reverse.foreach {\n-      baseClass =>\n-        val baseClassMembers = baseClass.typeSignature.members.sorted\n-        val baseClassColumns = baseClassMembers.filter(_.typeSignature <:< ru.typeOf[AbstractColumn[_]])\n-        baseClassColumns.foreach(symbol => if (!columnMembers.contains(symbol)) columnMembers += symbol)\n-    }\n-\n-    columnMembers.foreach {\n-      symbol =>\n-        val column = instanceMirror.reflectModule(symbol.asModule).instance\n-        _columns += column.asInstanceOf[AbstractColumn[_]]\n-    }\n+    val members: Seq[ru.Symbol] = (for {\n+      baseClass <- selfType.baseClasses.reverse\n+      symbol <- baseClass.typeSignature.members.sorted\n+      if symbol.typeSignature <:< ru.typeOf[AbstractColumn[_]]\n+    } yield symbol)(collection.breakOut)\n+\n+    for {\n+      symbol <- members.distinct\n+      table = if (symbol.isModule) {","path":"phantom-dsl/src/main/scala/com/websudos/phantom/CassandraTable.scala","position":74,"original_position":74,"commit_id":"598fc182f4ee67dc236410d74e983e25ecdc889d","original_commit_id":"598fc182f4ee67dc236410d74e983e25ecdc889d","user":{"login":"alexflav23","id":1645142,"avatar_url":"https://avatars.githubusercontent.com/u/1645142?v=3","gravatar_id":"","url":"https://api.github.com/users/alexflav23","html_url":"https://github.com/alexflav23","followers_url":"https://api.github.com/users/alexflav23/followers","following_url":"https://api.github.com/users/alexflav23/following{/other_user}","gists_url":"https://api.github.com/users/alexflav23/gists{/gist_id}","starred_url":"https://api.github.com/users/alexflav23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexflav23/subscriptions","organizations_url":"https://api.github.com/users/alexflav23/orgs","repos_url":"https://api.github.com/users/alexflav23/repos","events_url":"https://api.github.com/users/alexflav23/events{/privacy}","received_events_url":"https://api.github.com/users/alexflav23/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Consider using case matching instead of else if blocks](https://www.codacy.com/app/flavian/phantom_2/file/2212686038/issues/source?bid=2847375&fileBranchId=3171525#l204)","created_at":"2016-03-10T15:15:07Z","updated_at":"2016-03-10T15:15:07Z","html_url":"https://github.com/outworkers/phantom/pull/440#discussion_r55693340","pull_request_url":"https://api.github.com/repos/outworkers/phantom/pulls/440","_links":{"self":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/comments/55693340"},"html":{"href":"https://github.com/outworkers/phantom/pull/440#discussion_r55693340"},"pull_request":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/440"}}},"pull_request":{"url":"https://api.github.com/repos/outworkers/phantom/pulls/440","id":62400432,"html_url":"https://github.com/outworkers/phantom/pull/440","diff_url":"https://github.com/outworkers/phantom/pull/440.diff","patch_url":"https://github.com/outworkers/phantom/pull/440.patch","issue_url":"https://api.github.com/repos/outworkers/phantom/issues/440","number":440,"state":"open","locked":false,"title":"Fixing more codacy rules and publish support.","user":{"login":"alexflav23","id":1645142,"avatar_url":"https://avatars.githubusercontent.com/u/1645142?v=3","gravatar_id":"","url":"https://api.github.com/users/alexflav23","html_url":"https://github.com/alexflav23","followers_url":"https://api.github.com/users/alexflav23/followers","following_url":"https://api.github.com/users/alexflav23/following{/other_user}","gists_url":"https://api.github.com/users/alexflav23/gists{/gist_id}","starred_url":"https://api.github.com/users/alexflav23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexflav23/subscriptions","organizations_url":"https://api.github.com/users/alexflav23/orgs","repos_url":"https://api.github.com/users/alexflav23/repos","events_url":"https://api.github.com/users/alexflav23/events{/privacy}","received_events_url":"https://api.github.com/users/alexflav23/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T14:51:27Z","updated_at":"2016-03-10T15:15:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64fdc2afd333d2ab93b5bd4a1644a3f2ee503654","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/outworkers/phantom/pulls/440/commits","review_comments_url":"https://api.github.com/repos/outworkers/phantom/pulls/440/comments","review_comment_url":"https://api.github.com/repos/outworkers/phantom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/outworkers/phantom/issues/440/comments","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/598fc182f4ee67dc236410d74e983e25ecdc889d","head":{"label":"outworkers:release/codacy_rules","ref":"release/codacy_rules","sha":"598fc182f4ee67dc236410d74e983e25ecdc889d","user":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"repo":{"id":14509195,"name":"phantom","full_name":"outworkers/phantom","owner":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/outworkers/phantom","description":"Reactive type-safe Scala driver for Cassandra/Datastax Enterprise","fork":false,"url":"https://api.github.com/repos/outworkers/phantom","forks_url":"https://api.github.com/repos/outworkers/phantom/forks","keys_url":"https://api.github.com/repos/outworkers/phantom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outworkers/phantom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outworkers/phantom/teams","hooks_url":"https://api.github.com/repos/outworkers/phantom/hooks","issue_events_url":"https://api.github.com/repos/outworkers/phantom/issues/events{/number}","events_url":"https://api.github.com/repos/outworkers/phantom/events","assignees_url":"https://api.github.com/repos/outworkers/phantom/assignees{/user}","branches_url":"https://api.github.com/repos/outworkers/phantom/branches{/branch}","tags_url":"https://api.github.com/repos/outworkers/phantom/tags","blobs_url":"https://api.github.com/repos/outworkers/phantom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outworkers/phantom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outworkers/phantom/git/refs{/sha}","trees_url":"https://api.github.com/repos/outworkers/phantom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/{sha}","languages_url":"https://api.github.com/repos/outworkers/phantom/languages","stargazers_url":"https://api.github.com/repos/outworkers/phantom/stargazers","contributors_url":"https://api.github.com/repos/outworkers/phantom/contributors","subscribers_url":"https://api.github.com/repos/outworkers/phantom/subscribers","subscription_url":"https://api.github.com/repos/outworkers/phantom/subscription","commits_url":"https://api.github.com/repos/outworkers/phantom/commits{/sha}","git_commits_url":"https://api.github.com/repos/outworkers/phantom/git/commits{/sha}","comments_url":"https://api.github.com/repos/outworkers/phantom/comments{/number}","issue_comment_url":"https://api.github.com/repos/outworkers/phantom/issues/comments{/number}","contents_url":"https://api.github.com/repos/outworkers/phantom/contents/{+path}","compare_url":"https://api.github.com/repos/outworkers/phantom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outworkers/phantom/merges","archive_url":"https://api.github.com/repos/outworkers/phantom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outworkers/phantom/downloads","issues_url":"https://api.github.com/repos/outworkers/phantom/issues{/number}","pulls_url":"https://api.github.com/repos/outworkers/phantom/pulls{/number}","milestones_url":"https://api.github.com/repos/outworkers/phantom/milestones{/number}","notifications_url":"https://api.github.com/repos/outworkers/phantom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outworkers/phantom/labels{/name}","releases_url":"https://api.github.com/repos/outworkers/phantom/releases{/id}","deployments_url":"https://api.github.com/repos/outworkers/phantom/deployments","created_at":"2013-11-19T00:08:32Z","updated_at":"2016-03-08T23:11:16Z","pushed_at":"2016-03-10T15:03:27Z","git_url":"git://github.com/outworkers/phantom.git","ssh_url":"git@github.com:outworkers/phantom.git","clone_url":"https://github.com/outworkers/phantom.git","svn_url":"https://github.com/outworkers/phantom","homepage":"http://outworkers.github.io/phantom/","size":5852,"stargazers_count":392,"watchers_count":392,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":11,"forks":102,"open_issues":11,"watchers":392,"default_branch":"develop"}},"base":{"label":"outworkers:develop","ref":"develop","sha":"a1be4b8583836ae2194274e4920906e9aea523a2","user":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"repo":{"id":14509195,"name":"phantom","full_name":"outworkers/phantom","owner":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/outworkers/phantom","description":"Reactive type-safe Scala driver for Cassandra/Datastax Enterprise","fork":false,"url":"https://api.github.com/repos/outworkers/phantom","forks_url":"https://api.github.com/repos/outworkers/phantom/forks","keys_url":"https://api.github.com/repos/outworkers/phantom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outworkers/phantom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outworkers/phantom/teams","hooks_url":"https://api.github.com/repos/outworkers/phantom/hooks","issue_events_url":"https://api.github.com/repos/outworkers/phantom/issues/events{/number}","events_url":"https://api.github.com/repos/outworkers/phantom/events","assignees_url":"https://api.github.com/repos/outworkers/phantom/assignees{/user}","branches_url":"https://api.github.com/repos/outworkers/phantom/branches{/branch}","tags_url":"https://api.github.com/repos/outworkers/phantom/tags","blobs_url":"https://api.github.com/repos/outworkers/phantom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outworkers/phantom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outworkers/phantom/git/refs{/sha}","trees_url":"https://api.github.com/repos/outworkers/phantom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/{sha}","languages_url":"https://api.github.com/repos/outworkers/phantom/languages","stargazers_url":"https://api.github.com/repos/outworkers/phantom/stargazers","contributors_url":"https://api.github.com/repos/outworkers/phantom/contributors","subscribers_url":"https://api.github.com/repos/outworkers/phantom/subscribers","subscription_url":"https://api.github.com/repos/outworkers/phantom/subscription","commits_url":"https://api.github.com/repos/outworkers/phantom/commits{/sha}","git_commits_url":"https://api.github.com/repos/outworkers/phantom/git/commits{/sha}","comments_url":"https://api.github.com/repos/outworkers/phantom/comments{/number}","issue_comment_url":"https://api.github.com/repos/outworkers/phantom/issues/comments{/number}","contents_url":"https://api.github.com/repos/outworkers/phantom/contents/{+path}","compare_url":"https://api.github.com/repos/outworkers/phantom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outworkers/phantom/merges","archive_url":"https://api.github.com/repos/outworkers/phantom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outworkers/phantom/downloads","issues_url":"https://api.github.com/repos/outworkers/phantom/issues{/number}","pulls_url":"https://api.github.com/repos/outworkers/phantom/pulls{/number}","milestones_url":"https://api.github.com/repos/outworkers/phantom/milestones{/number}","notifications_url":"https://api.github.com/repos/outworkers/phantom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outworkers/phantom/labels{/name}","releases_url":"https://api.github.com/repos/outworkers/phantom/releases{/id}","deployments_url":"https://api.github.com/repos/outworkers/phantom/deployments","created_at":"2013-11-19T00:08:32Z","updated_at":"2016-03-08T23:11:16Z","pushed_at":"2016-03-10T15:03:27Z","git_url":"git://github.com/outworkers/phantom.git","ssh_url":"git@github.com:outworkers/phantom.git","clone_url":"https://github.com/outworkers/phantom.git","svn_url":"https://github.com/outworkers/phantom","homepage":"http://outworkers.github.io/phantom/","size":5852,"stargazers_count":392,"watchers_count":392,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":11,"forks":102,"open_issues":11,"watchers":392,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/440"},"html":{"href":"https://github.com/outworkers/phantom/pull/440"},"issue":{"href":"https://api.github.com/repos/outworkers/phantom/issues/440"},"comments":{"href":"https://api.github.com/repos/outworkers/phantom/issues/440/comments"},"review_comments":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/440/comments"},"review_comment":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/440/commits"},"statuses":{"href":"https://api.github.com/repos/outworkers/phantom/statuses/598fc182f4ee67dc236410d74e983e25ecdc889d"}}}}