{"action":"created","comment":{"url":"https://api.github.com/repos/javers/javers/pulls/comments/167958027","pull_request_review_id":96250135,"id":167958027,"diff_hunk":"@@ -0,0 +1,60 @@\n+package org.javers.repository.sql.cases;\n+\n+import org.fest.assertions.api.Assertions;\n+import org.javers.core.Javers;\n+import org.javers.core.JaversBuilder;\n+import org.javers.core.metamodel.annotation.Entity;\n+import org.javers.core.metamodel.annotation.Id;\n+import org.javers.core.metamodel.object.CdoSnapshot;\n+import org.javers.repository.sql.H2RepositoryFactory;\n+import org.junit.Before;\n+import org.junit.Test;\n+\n+import java.io.Serializable;\n+\n+/**\n+ * see https://github.com/javers/javers/issues/249\n+ * @author bartosz.walacik\n+ */\n+public class Case542CustomSchemaMaager {\n+\n+    public static abstract class AbstractEntity<T extends Serializable> {\n+\n+        @Id\n+        protected T id;\n+        protected T value;\n+\n+        public AbstractEntity(T id, T value) {\n+            this.id = id;\n+            this.value = value;\n+        }\n+    }\n+\n+    @Entity\n+    public class Account extends AbstractEntity<String> {\n+        public Account(String id, String value) {\n+            super(id, value);\n+        }\n+    }\n+\n+    @Before\n+    public void shouldCreateSchema(){\n+        JaversBuilder.javers().registerJaversRepository(H2RepositoryFactory.create()).build();\n+    }\n+\n+    @Test\n+    public void shouldCommitEntityWithSerializableId() {\n+        //given\n+        Javers javers = JaversBuilder.javers()\n+                .registerJaversRepository(H2RepositoryFactory.createWithCustomSchemaManager()).build();","path":"javers-persistence-sql/src/test/java/org/javers/repository/sql/cases/Case542CustomSchemaMaager.java","position":49,"original_position":49,"commit_id":"e7e2452b3cb3b85ad361f6f306f7ee52378b67f1","original_commit_id":"e7e2452b3cb3b85ad361f6f306f7ee52378b67f1","user":{"login":"antoniocasino","id":2138576,"avatar_url":"https://avatars3.githubusercontent.com/u/2138576?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniocasino","html_url":"https://github.com/antoniocasino","followers_url":"https://api.github.com/users/antoniocasino/followers","following_url":"https://api.github.com/users/antoniocasino/following{/other_user}","gists_url":"https://api.github.com/users/antoniocasino/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniocasino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniocasino/subscriptions","organizations_url":"https://api.github.com/users/antoniocasino/orgs","repos_url":"https://api.github.com/users/antoniocasino/repos","events_url":"https://api.github.com/users/antoniocasino/events{/privacy}","received_events_url":"https://api.github.com/users/antoniocasino/received_events","type":"User","site_admin":false},"body":"even if custom schema manager does not create tables it still write on them, indeed data is written via javers commit. CustomSchemaManager use another change I introduced that is the ability to instance TableNameProvider with an optional instead of using SqlRepositoryConfiguration that has a package visibility  ","created_at":"2018-02-13T18:30:07Z","updated_at":"2018-02-13T18:30:07Z","html_url":"https://github.com/javers/javers/pull/637#discussion_r167958027","pull_request_url":"https://api.github.com/repos/javers/javers/pulls/637","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/javers/javers/pulls/comments/167958027"},"html":{"href":"https://github.com/javers/javers/pull/637#discussion_r167958027"},"pull_request":{"href":"https://api.github.com/repos/javers/javers/pulls/637"}},"in_reply_to_id":167953374},"pull_request":{"url":"https://api.github.com/repos/javers/javers/pulls/637","id":168771681,"html_url":"https://github.com/javers/javers/pull/637","diff_url":"https://github.com/javers/javers/pull/637.diff","patch_url":"https://github.com/javers/javers/pull/637.patch","issue_url":"https://api.github.com/repos/javers/javers/issues/637","number":637,"state":"open","locked":false,"title":" Possibility to manage Javers SQL schema creation","user":{"login":"antoniocasino","id":2138576,"avatar_url":"https://avatars3.githubusercontent.com/u/2138576?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniocasino","html_url":"https://github.com/antoniocasino","followers_url":"https://api.github.com/users/antoniocasino/followers","following_url":"https://api.github.com/users/antoniocasino/following{/other_user}","gists_url":"https://api.github.com/users/antoniocasino/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniocasino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniocasino/subscriptions","organizations_url":"https://api.github.com/users/antoniocasino/orgs","repos_url":"https://api.github.com/users/antoniocasino/repos","events_url":"https://api.github.com/users/antoniocasino/events{/privacy}","received_events_url":"https://api.github.com/users/antoniocasino/received_events","type":"User","site_admin":false},"body":"I implemented it with a custom schema manager that can be injected in JaversSqlRepository","created_at":"2018-02-13T07:28:35Z","updated_at":"2018-02-13T18:30:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d418e9af8f7486877fd34434883f774a0b00e1ed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/javers/javers/pulls/637/commits","review_comments_url":"https://api.github.com/repos/javers/javers/pulls/637/comments","review_comment_url":"https://api.github.com/repos/javers/javers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javers/javers/issues/637/comments","statuses_url":"https://api.github.com/repos/javers/javers/statuses/e7e2452b3cb3b85ad361f6f306f7ee52378b67f1","head":{"label":"antoniocasino:master","ref":"master","sha":"e7e2452b3cb3b85ad361f6f306f7ee52378b67f1","user":{"login":"antoniocasino","id":2138576,"avatar_url":"https://avatars3.githubusercontent.com/u/2138576?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniocasino","html_url":"https://github.com/antoniocasino","followers_url":"https://api.github.com/users/antoniocasino/followers","following_url":"https://api.github.com/users/antoniocasino/following{/other_user}","gists_url":"https://api.github.com/users/antoniocasino/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniocasino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniocasino/subscriptions","organizations_url":"https://api.github.com/users/antoniocasino/orgs","repos_url":"https://api.github.com/users/antoniocasino/repos","events_url":"https://api.github.com/users/antoniocasino/events{/privacy}","received_events_url":"https://api.github.com/users/antoniocasino/received_events","type":"User","site_admin":false},"repo":{"id":121320102,"name":"javers","full_name":"antoniocasino/javers","owner":{"login":"antoniocasino","id":2138576,"avatar_url":"https://avatars3.githubusercontent.com/u/2138576?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniocasino","html_url":"https://github.com/antoniocasino","followers_url":"https://api.github.com/users/antoniocasino/followers","following_url":"https://api.github.com/users/antoniocasino/following{/other_user}","gists_url":"https://api.github.com/users/antoniocasino/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniocasino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniocasino/subscriptions","organizations_url":"https://api.github.com/users/antoniocasino/orgs","repos_url":"https://api.github.com/users/antoniocasino/repos","events_url":"https://api.github.com/users/antoniocasino/events{/privacy}","received_events_url":"https://api.github.com/users/antoniocasino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antoniocasino/javers","description":"JaVers - object auditing and diff framework for Java","fork":true,"url":"https://api.github.com/repos/antoniocasino/javers","forks_url":"https://api.github.com/repos/antoniocasino/javers/forks","keys_url":"https://api.github.com/repos/antoniocasino/javers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antoniocasino/javers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antoniocasino/javers/teams","hooks_url":"https://api.github.com/repos/antoniocasino/javers/hooks","issue_events_url":"https://api.github.com/repos/antoniocasino/javers/issues/events{/number}","events_url":"https://api.github.com/repos/antoniocasino/javers/events","assignees_url":"https://api.github.com/repos/antoniocasino/javers/assignees{/user}","branches_url":"https://api.github.com/repos/antoniocasino/javers/branches{/branch}","tags_url":"https://api.github.com/repos/antoniocasino/javers/tags","blobs_url":"https://api.github.com/repos/antoniocasino/javers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antoniocasino/javers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antoniocasino/javers/git/refs{/sha}","trees_url":"https://api.github.com/repos/antoniocasino/javers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antoniocasino/javers/statuses/{sha}","languages_url":"https://api.github.com/repos/antoniocasino/javers/languages","stargazers_url":"https://api.github.com/repos/antoniocasino/javers/stargazers","contributors_url":"https://api.github.com/repos/antoniocasino/javers/contributors","subscribers_url":"https://api.github.com/repos/antoniocasino/javers/subscribers","subscription_url":"https://api.github.com/repos/antoniocasino/javers/subscription","commits_url":"https://api.github.com/repos/antoniocasino/javers/commits{/sha}","git_commits_url":"https://api.github.com/repos/antoniocasino/javers/git/commits{/sha}","comments_url":"https://api.github.com/repos/antoniocasino/javers/comments{/number}","issue_comment_url":"https://api.github.com/repos/antoniocasino/javers/issues/comments{/number}","contents_url":"https://api.github.com/repos/antoniocasino/javers/contents/{+path}","compare_url":"https://api.github.com/repos/antoniocasino/javers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antoniocasino/javers/merges","archive_url":"https://api.github.com/repos/antoniocasino/javers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antoniocasino/javers/downloads","issues_url":"https://api.github.com/repos/antoniocasino/javers/issues{/number}","pulls_url":"https://api.github.com/repos/antoniocasino/javers/pulls{/number}","milestones_url":"https://api.github.com/repos/antoniocasino/javers/milestones{/number}","notifications_url":"https://api.github.com/repos/antoniocasino/javers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antoniocasino/javers/labels{/name}","releases_url":"https://api.github.com/repos/antoniocasino/javers/releases{/id}","deployments_url":"https://api.github.com/repos/antoniocasino/javers/deployments","created_at":"2018-02-13T00:31:26Z","updated_at":"2018-02-13T00:31:29Z","pushed_at":"2018-02-13T01:19:48Z","git_url":"git://github.com/antoniocasino/javers.git","ssh_url":"git@github.com:antoniocasino/javers.git","clone_url":"https://github.com/antoniocasino/javers.git","svn_url":"https://github.com/antoniocasino/javers","homepage":"http://javers.org","size":5047,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"javers:master","ref":"master","sha":"988210bb3cdb80ad3f0a745cfbdc09bcbd353e31","user":{"login":"javers","id":6149633,"avatar_url":"https://avatars1.githubusercontent.com/u/6149633?v=4","gravatar_id":"","url":"https://api.github.com/users/javers","html_url":"https://github.com/javers","followers_url":"https://api.github.com/users/javers/followers","following_url":"https://api.github.com/users/javers/following{/other_user}","gists_url":"https://api.github.com/users/javers/gists{/gist_id}","starred_url":"https://api.github.com/users/javers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javers/subscriptions","organizations_url":"https://api.github.com/users/javers/orgs","repos_url":"https://api.github.com/users/javers/repos","events_url":"https://api.github.com/users/javers/events{/privacy}","received_events_url":"https://api.github.com/users/javers/received_events","type":"Organization","site_admin":false},"repo":{"id":15071115,"name":"javers","full_name":"javers/javers","owner":{"login":"javers","id":6149633,"avatar_url":"https://avatars1.githubusercontent.com/u/6149633?v=4","gravatar_id":"","url":"https://api.github.com/users/javers","html_url":"https://github.com/javers","followers_url":"https://api.github.com/users/javers/followers","following_url":"https://api.github.com/users/javers/following{/other_user}","gists_url":"https://api.github.com/users/javers/gists{/gist_id}","starred_url":"https://api.github.com/users/javers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javers/subscriptions","organizations_url":"https://api.github.com/users/javers/orgs","repos_url":"https://api.github.com/users/javers/repos","events_url":"https://api.github.com/users/javers/events{/privacy}","received_events_url":"https://api.github.com/users/javers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/javers/javers","description":"JaVers - object auditing and diff framework for Java","fork":false,"url":"https://api.github.com/repos/javers/javers","forks_url":"https://api.github.com/repos/javers/javers/forks","keys_url":"https://api.github.com/repos/javers/javers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javers/javers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javers/javers/teams","hooks_url":"https://api.github.com/repos/javers/javers/hooks","issue_events_url":"https://api.github.com/repos/javers/javers/issues/events{/number}","events_url":"https://api.github.com/repos/javers/javers/events","assignees_url":"https://api.github.com/repos/javers/javers/assignees{/user}","branches_url":"https://api.github.com/repos/javers/javers/branches{/branch}","tags_url":"https://api.github.com/repos/javers/javers/tags","blobs_url":"https://api.github.com/repos/javers/javers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javers/javers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javers/javers/git/refs{/sha}","trees_url":"https://api.github.com/repos/javers/javers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javers/javers/statuses/{sha}","languages_url":"https://api.github.com/repos/javers/javers/languages","stargazers_url":"https://api.github.com/repos/javers/javers/stargazers","contributors_url":"https://api.github.com/repos/javers/javers/contributors","subscribers_url":"https://api.github.com/repos/javers/javers/subscribers","subscription_url":"https://api.github.com/repos/javers/javers/subscription","commits_url":"https://api.github.com/repos/javers/javers/commits{/sha}","git_commits_url":"https://api.github.com/repos/javers/javers/git/commits{/sha}","comments_url":"https://api.github.com/repos/javers/javers/comments{/number}","issue_comment_url":"https://api.github.com/repos/javers/javers/issues/comments{/number}","contents_url":"https://api.github.com/repos/javers/javers/contents/{+path}","compare_url":"https://api.github.com/repos/javers/javers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javers/javers/merges","archive_url":"https://api.github.com/repos/javers/javers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javers/javers/downloads","issues_url":"https://api.github.com/repos/javers/javers/issues{/number}","pulls_url":"https://api.github.com/repos/javers/javers/pulls{/number}","milestones_url":"https://api.github.com/repos/javers/javers/milestones{/number}","notifications_url":"https://api.github.com/repos/javers/javers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javers/javers/labels{/name}","releases_url":"https://api.github.com/repos/javers/javers/releases{/id}","deployments_url":"https://api.github.com/repos/javers/javers/deployments","created_at":"2013-12-10T08:23:03Z","updated_at":"2018-02-13T06:36:55Z","pushed_at":"2018-02-13T07:28:36Z","git_url":"git://github.com/javers/javers.git","ssh_url":"git@github.com:javers/javers.git","clone_url":"https://github.com/javers/javers.git","svn_url":"https://github.com/javers/javers","homepage":"http://javers.org","size":5043,"stargazers_count":338,"watchers_count":338,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":109,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":109,"open_issues":17,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javers/javers/pulls/637"},"html":{"href":"https://github.com/javers/javers/pull/637"},"issue":{"href":"https://api.github.com/repos/javers/javers/issues/637"},"comments":{"href":"https://api.github.com/repos/javers/javers/issues/637/comments"},"review_comments":{"href":"https://api.github.com/repos/javers/javers/pulls/637/comments"},"review_comment":{"href":"https://api.github.com/repos/javers/javers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javers/javers/pulls/637/commits"},"statuses":{"href":"https://api.github.com/repos/javers/javers/statuses/e7e2452b3cb3b85ad361f6f306f7ee52378b67f1"}},"author_association":"NONE"}}
{"actor":{"display_login":"antoniocasino"}}