{"action":"created","comment":{"url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/comments/64041394","id":64041394,"diff_hunk":"@@ -1743,8 +1746,17 @@ public String getSubclassForDiscriminatorValue(Object value) {\n \t\treturn spaces;\n \t}\n \n-\tpublic TupleContext getTupleContext() {\n-\t\treturn tupleContext;\n+\t/**\n+\t * Returns the {@link TupleContext}.\n+\t *\n+\t * @param session the current session, if null the {@link TupleContext#getTransactionContext()} will be null.\n+\t * @return the tupleContext for the session\n+\t */\n+\tpublic TupleContext getTupleContext( SessionImplementor session ) {","path":"core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java","position":186,"original_position":186,"commit_id":"1062ba6a11da21113946846578607c5c59c98771","original_commit_id":"1062ba6a11da21113946846578607c5c59c98771","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"body":"It happens when massindexing, in that case there is not a session when the foreach method is called.\r\nAt the moment, Neo4j does not work with the massindexer because of different Lucene versions. \r\nIt should be possible to implement it in the remote scenario but I haven't done that yet","created_at":"2016-05-20T13:33:39Z","updated_at":"2016-05-20T13:33:39Z","html_url":"https://github.com/hibernate/hibernate-ogm/pull/676#discussion_r64041394","pull_request_url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676","_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/comments/64041394"},"html":{"href":"https://github.com/hibernate/hibernate-ogm/pull/676#discussion_r64041394"},"pull_request":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676"}}},"pull_request":{"url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676","id":70324332,"html_url":"https://github.com/hibernate/hibernate-ogm/pull/676","diff_url":"https://github.com/hibernate/hibernate-ogm/pull/676.diff","patch_url":"https://github.com/hibernate/hibernate-ogm/pull/676.patch","issue_url":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/676","number":676,"state":"open","locked":false,"title":"OGM-1038 Pass transaction id to dialects","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"body":"https://hibernate.atlassian.net/browse/OGM-1038\r\n\r\nThis will make it possible for a dialect to access information about the current transaction. At the moment is only the transaction id.\r\n\r\nI haven't added any tests for this specific part since none of the current dialects need this information.\r\nIt will be used by the Neo4j remote dialect in following PR.\r\n\r\nNote that I added a `QueryContext` to the method executing native queries. It will also store the `TupleContext` removing the need to save the sessionFactory in the Neo4j dialect.\r\n\r\nWe already discussed about this PR in the pasts but we changed the codebase a bit so, maybe, you won't to have a quick look.","created_at":"2016-05-17T09:22:44Z","updated_at":"2016-05-20T13:33:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a61b435ee5c6aca4f5f31cb517e8cb0ca4a9432b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676/commits","review_comments_url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676/comments","review_comment_url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/676/comments","statuses_url":"https://api.github.com/repos/hibernate/hibernate-ogm/statuses/1062ba6a11da21113946846578607c5c59c98771","head":{"label":"DavideD:OGM-1038-TransactionID-take2","ref":"OGM-1038-TransactionID-take2","sha":"1062ba6a11da21113946846578607c5c59c98771","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"repo":{"id":1645658,"name":"hibernate-ogm","full_name":"DavideD/hibernate-ogm","owner":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavideD/hibernate-ogm","description":"Hibernate Object/Grid Mapper","fork":true,"url":"https://api.github.com/repos/DavideD/hibernate-ogm","forks_url":"https://api.github.com/repos/DavideD/hibernate-ogm/forks","keys_url":"https://api.github.com/repos/DavideD/hibernate-ogm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavideD/hibernate-ogm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavideD/hibernate-ogm/teams","hooks_url":"https://api.github.com/repos/DavideD/hibernate-ogm/hooks","issue_events_url":"https://api.github.com/repos/DavideD/hibernate-ogm/issues/events{/number}","events_url":"https://api.github.com/repos/DavideD/hibernate-ogm/events","assignees_url":"https://api.github.com/repos/DavideD/hibernate-ogm/assignees{/user}","branches_url":"https://api.github.com/repos/DavideD/hibernate-ogm/branches{/branch}","tags_url":"https://api.github.com/repos/DavideD/hibernate-ogm/tags","blobs_url":"https://api.github.com/repos/DavideD/hibernate-ogm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavideD/hibernate-ogm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavideD/hibernate-ogm/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavideD/hibernate-ogm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavideD/hibernate-ogm/statuses/{sha}","languages_url":"https://api.github.com/repos/DavideD/hibernate-ogm/languages","stargazers_url":"https://api.github.com/repos/DavideD/hibernate-ogm/stargazers","contributors_url":"https://api.github.com/repos/DavideD/hibernate-ogm/contributors","subscribers_url":"https://api.github.com/repos/DavideD/hibernate-ogm/subscribers","subscription_url":"https://api.github.com/repos/DavideD/hibernate-ogm/subscription","commits_url":"https://api.github.com/repos/DavideD/hibernate-ogm/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavideD/hibernate-ogm/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavideD/hibernate-ogm/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavideD/hibernate-ogm/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavideD/hibernate-ogm/contents/{+path}","compare_url":"https://api.github.com/repos/DavideD/hibernate-ogm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavideD/hibernate-ogm/merges","archive_url":"https://api.github.com/repos/DavideD/hibernate-ogm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavideD/hibernate-ogm/downloads","issues_url":"https://api.github.com/repos/DavideD/hibernate-ogm/issues{/number}","pulls_url":"https://api.github.com/repos/DavideD/hibernate-ogm/pulls{/number}","milestones_url":"https://api.github.com/repos/DavideD/hibernate-ogm/milestones{/number}","notifications_url":"https://api.github.com/repos/DavideD/hibernate-ogm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavideD/hibernate-ogm/labels{/name}","releases_url":"https://api.github.com/repos/DavideD/hibernate-ogm/releases{/id}","deployments_url":"https://api.github.com/repos/DavideD/hibernate-ogm/deployments","created_at":"2011-04-21T14:40:12Z","updated_at":"2016-03-06T05:30:28Z","pushed_at":"2016-05-20T09:42:12Z","git_url":"git://github.com/DavideD/hibernate-ogm.git","ssh_url":"git@github.com:DavideD/hibernate-ogm.git","clone_url":"https://github.com/DavideD/hibernate-ogm.git","svn_url":"https://github.com/DavideD/hibernate-ogm","homepage":"http://community.jboss.org/en/hibernate/ogm","size":14422,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"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":2,"default_branch":"master"}},"base":{"label":"hibernate:master","ref":"master","sha":"9dfab48f5db7261f3aea04e4f610b4209db55173","user":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"repo":{"id":1608936,"name":"hibernate-ogm","full_name":"hibernate/hibernate-ogm","owner":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hibernate/hibernate-ogm","description":"Hibernate OGM - Domain model persistence for NoSQL datastores","fork":false,"url":"https://api.github.com/repos/hibernate/hibernate-ogm","forks_url":"https://api.github.com/repos/hibernate/hibernate-ogm/forks","keys_url":"https://api.github.com/repos/hibernate/hibernate-ogm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hibernate/hibernate-ogm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hibernate/hibernate-ogm/teams","hooks_url":"https://api.github.com/repos/hibernate/hibernate-ogm/hooks","issue_events_url":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/events{/number}","events_url":"https://api.github.com/repos/hibernate/hibernate-ogm/events","assignees_url":"https://api.github.com/repos/hibernate/hibernate-ogm/assignees{/user}","branches_url":"https://api.github.com/repos/hibernate/hibernate-ogm/branches{/branch}","tags_url":"https://api.github.com/repos/hibernate/hibernate-ogm/tags","blobs_url":"https://api.github.com/repos/hibernate/hibernate-ogm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hibernate/hibernate-ogm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hibernate/hibernate-ogm/git/refs{/sha}","trees_url":"https://api.github.com/repos/hibernate/hibernate-ogm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hibernate/hibernate-ogm/statuses/{sha}","languages_url":"https://api.github.com/repos/hibernate/hibernate-ogm/languages","stargazers_url":"https://api.github.com/repos/hibernate/hibernate-ogm/stargazers","contributors_url":"https://api.github.com/repos/hibernate/hibernate-ogm/contributors","subscribers_url":"https://api.github.com/repos/hibernate/hibernate-ogm/subscribers","subscription_url":"https://api.github.com/repos/hibernate/hibernate-ogm/subscription","commits_url":"https://api.github.com/repos/hibernate/hibernate-ogm/commits{/sha}","git_commits_url":"https://api.github.com/repos/hibernate/hibernate-ogm/git/commits{/sha}","comments_url":"https://api.github.com/repos/hibernate/hibernate-ogm/comments{/number}","issue_comment_url":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/comments{/number}","contents_url":"https://api.github.com/repos/hibernate/hibernate-ogm/contents/{+path}","compare_url":"https://api.github.com/repos/hibernate/hibernate-ogm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hibernate/hibernate-ogm/merges","archive_url":"https://api.github.com/repos/hibernate/hibernate-ogm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hibernate/hibernate-ogm/downloads","issues_url":"https://api.github.com/repos/hibernate/hibernate-ogm/issues{/number}","pulls_url":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls{/number}","milestones_url":"https://api.github.com/repos/hibernate/hibernate-ogm/milestones{/number}","notifications_url":"https://api.github.com/repos/hibernate/hibernate-ogm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hibernate/hibernate-ogm/labels{/name}","releases_url":"https://api.github.com/repos/hibernate/hibernate-ogm/releases{/id}","deployments_url":"https://api.github.com/repos/hibernate/hibernate-ogm/deployments","created_at":"2011-04-13T11:40:56Z","updated_at":"2016-05-16T22:12:02Z","pushed_at":"2016-05-20T09:42:13Z","git_url":"git://github.com/hibernate/hibernate-ogm.git","ssh_url":"git@github.com:hibernate/hibernate-ogm.git","clone_url":"https://github.com/hibernate/hibernate-ogm.git","svn_url":"https://github.com/hibernate/hibernate-ogm","homepage":"http://hibernate.org/ogm/","size":17097,"stargazers_count":193,"watchers_count":193,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":8,"forks":137,"open_issues":8,"watchers":193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676"},"html":{"href":"https://github.com/hibernate/hibernate-ogm/pull/676"},"issue":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/676"},"comments":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/issues/676/comments"},"review_comments":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676/comments"},"review_comment":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/pulls/676/commits"},"statuses":{"href":"https://api.github.com/repos/hibernate/hibernate-ogm/statuses/1062ba6a11da21113946846578607c5c59c98771"}}}}
{"actor":{"display_login":"DavideD"}}