{"action":"created","comment":{"url":"https://api.github.com/repos/outr/scalarelational/pulls/comments/35326584","id":35326584,"diff_hunk":"@@ -7,17 +10,19 @@ import org.scalarelational.instruction.{Update, InsertSingle}\n  * @author Matt Hicks <matt@outr.com>\n  */\n trait Entity {\n-  def toColumnValues: List[ColumnValue[Any]] =\n-    throw new RuntimeException(s\"@mapped annotation missing for table ${this.getClass}\")\n+  def mapTo[T <: Entity](table: Table): List[ColumnValue[Any]] =\n+    macro mapped.mapTo[T]\n+\n+  def columns: List[ColumnValue[Any]]","path":"mapper/src/main/scala/org/scalarelational/mapper/Entity.scala","position":18,"original_position":18,"commit_id":"b5861e9f047536d8c12c4dd6a10131a868c83076","original_commit_id":"b5861e9f047536d8c12c4dd6a10131a868c83076","user":{"login":"tindzk","id":196819,"avatar_url":"https://avatars.githubusercontent.com/u/196819?v=3","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"body":"I agree. The reason is that it behaves like a DSL: ``def columns = mapTo[Supplier](Datastore.suppliers)``. How would you name it?","created_at":"2015-07-23T14:27:31Z","updated_at":"2015-07-23T14:27:31Z","html_url":"https://github.com/outr/scalarelational/pull/40#discussion_r35326584","pull_request_url":"https://api.github.com/repos/outr/scalarelational/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/comments/35326584"},"html":{"href":"https://github.com/outr/scalarelational/pull/40#discussion_r35326584"},"pull_request":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/outr/scalarelational/pulls/40","id":40664244,"html_url":"https://github.com/outr/scalarelational/pull/40","diff_url":"https://github.com/outr/scalarelational/pull/40.diff","patch_url":"https://github.com/outr/scalarelational/pull/40.patch","issue_url":"https://api.github.com/repos/outr/scalarelational/issues/40","number":40,"state":"closed","locked":false,"title":"Entity: Do not replace `case class`","user":{"login":"tindzk","id":196819,"avatar_url":"https://avatars.githubusercontent.com/u/196819?v=3","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-23T12:02:09Z","updated_at":"2015-07-23T14:27:31Z","closed_at":"2015-07-23T14:26:32Z","merged_at":"2015-07-23T14:26:32Z","merge_commit_sha":"3d61f019e120667d8a1ca94a30bf7f25adf50ce1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/outr/scalarelational/pulls/40/commits","review_comments_url":"https://api.github.com/repos/outr/scalarelational/pulls/40/comments","review_comment_url":"https://api.github.com/repos/outr/scalarelational/pulls/comments{/number}","comments_url":"https://api.github.com/repos/outr/scalarelational/issues/40/comments","statuses_url":"https://api.github.com/repos/outr/scalarelational/statuses/b5861e9f047536d8c12c4dd6a10131a868c83076","head":{"label":"tindzk:macros","ref":"macros","sha":"b5861e9f047536d8c12c4dd6a10131a868c83076","user":{"login":"tindzk","id":196819,"avatar_url":"https://avatars.githubusercontent.com/u/196819?v=3","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"repo":{"id":38432989,"name":"scalarelational","full_name":"tindzk/scalarelational","owner":{"login":"tindzk","id":196819,"avatar_url":"https://avatars.githubusercontent.com/u/196819?v=3","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tindzk/scalarelational","description":"Type-Safe framework for defining, modifying, and querying SQL databases","fork":true,"url":"https://api.github.com/repos/tindzk/scalarelational","forks_url":"https://api.github.com/repos/tindzk/scalarelational/forks","keys_url":"https://api.github.com/repos/tindzk/scalarelational/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tindzk/scalarelational/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tindzk/scalarelational/teams","hooks_url":"https://api.github.com/repos/tindzk/scalarelational/hooks","issue_events_url":"https://api.github.com/repos/tindzk/scalarelational/issues/events{/number}","events_url":"https://api.github.com/repos/tindzk/scalarelational/events","assignees_url":"https://api.github.com/repos/tindzk/scalarelational/assignees{/user}","branches_url":"https://api.github.com/repos/tindzk/scalarelational/branches{/branch}","tags_url":"https://api.github.com/repos/tindzk/scalarelational/tags","blobs_url":"https://api.github.com/repos/tindzk/scalarelational/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tindzk/scalarelational/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tindzk/scalarelational/git/refs{/sha}","trees_url":"https://api.github.com/repos/tindzk/scalarelational/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tindzk/scalarelational/statuses/{sha}","languages_url":"https://api.github.com/repos/tindzk/scalarelational/languages","stargazers_url":"https://api.github.com/repos/tindzk/scalarelational/stargazers","contributors_url":"https://api.github.com/repos/tindzk/scalarelational/contributors","subscribers_url":"https://api.github.com/repos/tindzk/scalarelational/subscribers","subscription_url":"https://api.github.com/repos/tindzk/scalarelational/subscription","commits_url":"https://api.github.com/repos/tindzk/scalarelational/commits{/sha}","git_commits_url":"https://api.github.com/repos/tindzk/scalarelational/git/commits{/sha}","comments_url":"https://api.github.com/repos/tindzk/scalarelational/comments{/number}","issue_comment_url":"https://api.github.com/repos/tindzk/scalarelational/issues/comments{/number}","contents_url":"https://api.github.com/repos/tindzk/scalarelational/contents/{+path}","compare_url":"https://api.github.com/repos/tindzk/scalarelational/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tindzk/scalarelational/merges","archive_url":"https://api.github.com/repos/tindzk/scalarelational/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tindzk/scalarelational/downloads","issues_url":"https://api.github.com/repos/tindzk/scalarelational/issues{/number}","pulls_url":"https://api.github.com/repos/tindzk/scalarelational/pulls{/number}","milestones_url":"https://api.github.com/repos/tindzk/scalarelational/milestones{/number}","notifications_url":"https://api.github.com/repos/tindzk/scalarelational/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tindzk/scalarelational/labels{/name}","releases_url":"https://api.github.com/repos/tindzk/scalarelational/releases{/id}","created_at":"2015-07-02T13:01:38Z","updated_at":"2015-07-02T13:01:38Z","pushed_at":"2015-07-23T12:20:15Z","git_url":"git://github.com/tindzk/scalarelational.git","ssh_url":"git@github.com:tindzk/scalarelational.git","clone_url":"https://github.com/tindzk/scalarelational.git","svn_url":"https://github.com/tindzk/scalarelational","homepage":null,"size":672,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":0,"default_branch":"master"}},"base":{"label":"outr:master","ref":"master","sha":"c019562e04c2e18fef0e0c628e9116414baa4680","user":{"login":"outr","id":5854353,"avatar_url":"https://avatars.githubusercontent.com/u/5854353?v=3","gravatar_id":"","url":"https://api.github.com/users/outr","html_url":"https://github.com/outr","followers_url":"https://api.github.com/users/outr/followers","following_url":"https://api.github.com/users/outr/following{/other_user}","gists_url":"https://api.github.com/users/outr/gists{/gist_id}","starred_url":"https://api.github.com/users/outr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outr/subscriptions","organizations_url":"https://api.github.com/users/outr/orgs","repos_url":"https://api.github.com/users/outr/repos","events_url":"https://api.github.com/users/outr/events{/privacy}","received_events_url":"https://api.github.com/users/outr/received_events","type":"Organization","site_admin":false},"repo":{"id":14048773,"name":"scalarelational","full_name":"outr/scalarelational","owner":{"login":"outr","id":5854353,"avatar_url":"https://avatars.githubusercontent.com/u/5854353?v=3","gravatar_id":"","url":"https://api.github.com/users/outr","html_url":"https://github.com/outr","followers_url":"https://api.github.com/users/outr/followers","following_url":"https://api.github.com/users/outr/following{/other_user}","gists_url":"https://api.github.com/users/outr/gists{/gist_id}","starred_url":"https://api.github.com/users/outr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outr/subscriptions","organizations_url":"https://api.github.com/users/outr/orgs","repos_url":"https://api.github.com/users/outr/repos","events_url":"https://api.github.com/users/outr/events{/privacy}","received_events_url":"https://api.github.com/users/outr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/outr/scalarelational","description":"Type-Safe framework for defining, modifying, and querying SQL databases","fork":false,"url":"https://api.github.com/repos/outr/scalarelational","forks_url":"https://api.github.com/repos/outr/scalarelational/forks","keys_url":"https://api.github.com/repos/outr/scalarelational/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outr/scalarelational/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outr/scalarelational/teams","hooks_url":"https://api.github.com/repos/outr/scalarelational/hooks","issue_events_url":"https://api.github.com/repos/outr/scalarelational/issues/events{/number}","events_url":"https://api.github.com/repos/outr/scalarelational/events","assignees_url":"https://api.github.com/repos/outr/scalarelational/assignees{/user}","branches_url":"https://api.github.com/repos/outr/scalarelational/branches{/branch}","tags_url":"https://api.github.com/repos/outr/scalarelational/tags","blobs_url":"https://api.github.com/repos/outr/scalarelational/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outr/scalarelational/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outr/scalarelational/git/refs{/sha}","trees_url":"https://api.github.com/repos/outr/scalarelational/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outr/scalarelational/statuses/{sha}","languages_url":"https://api.github.com/repos/outr/scalarelational/languages","stargazers_url":"https://api.github.com/repos/outr/scalarelational/stargazers","contributors_url":"https://api.github.com/repos/outr/scalarelational/contributors","subscribers_url":"https://api.github.com/repos/outr/scalarelational/subscribers","subscription_url":"https://api.github.com/repos/outr/scalarelational/subscription","commits_url":"https://api.github.com/repos/outr/scalarelational/commits{/sha}","git_commits_url":"https://api.github.com/repos/outr/scalarelational/git/commits{/sha}","comments_url":"https://api.github.com/repos/outr/scalarelational/comments{/number}","issue_comment_url":"https://api.github.com/repos/outr/scalarelational/issues/comments{/number}","contents_url":"https://api.github.com/repos/outr/scalarelational/contents/{+path}","compare_url":"https://api.github.com/repos/outr/scalarelational/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outr/scalarelational/merges","archive_url":"https://api.github.com/repos/outr/scalarelational/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outr/scalarelational/downloads","issues_url":"https://api.github.com/repos/outr/scalarelational/issues{/number}","pulls_url":"https://api.github.com/repos/outr/scalarelational/pulls{/number}","milestones_url":"https://api.github.com/repos/outr/scalarelational/milestones{/number}","notifications_url":"https://api.github.com/repos/outr/scalarelational/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outr/scalarelational/labels{/name}","releases_url":"https://api.github.com/repos/outr/scalarelational/releases{/id}","created_at":"2013-11-01T17:14:15Z","updated_at":"2015-07-19T15:59:17Z","pushed_at":"2015-07-23T14:26:33Z","git_url":"git://github.com/outr/scalarelational.git","ssh_url":"git@github.com:outr/scalarelational.git","clone_url":"https://github.com/outr/scalarelational.git","svn_url":"https://github.com/outr/scalarelational","homepage":null,"size":1467,"stargazers_count":18,"watchers_count":18,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/40"},"html":{"href":"https://github.com/outr/scalarelational/pull/40"},"issue":{"href":"https://api.github.com/repos/outr/scalarelational/issues/40"},"comments":{"href":"https://api.github.com/repos/outr/scalarelational/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/outr/scalarelational/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/outr/scalarelational/statuses/b5861e9f047536d8c12c4dd6a10131a868c83076"}}}}