You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2015/06/26 12:54:04 UTC

[jira] [Commented] (TINKERPOP3-749) Consider moving Transaction.create() on to Graph.createTx()

    [ https://issues.apache.org/jira/browse/TINKERPOP3-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602692#comment-14602692 ] 

stephen mallette commented on TINKERPOP3-749:
---------------------------------------------

I think I'd rather keep the transaction methods grouped together on the {{Transaction}} itself.  Having said that, most people don't understand the notion of a threaded transaction in the first place so I suppose I see your point in the confusion that could brew. Rather than move it to {{{Graph}} could we accomplish the same thing by renaming {{create()}}?  maybe it's: {{tx().newThreadedTx()}} or {{tx().createThreadedTx()}} - to me that doesn't imply a "child".  something along those lines maybe? 


> Consider moving Transaction.create() on to Graph.createTx()
> -----------------------------------------------------------
>
>                 Key: TINKERPOP3-749
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-749
>             Project: TinkerPop 3
>          Issue Type: Improvement
>            Reporter: Bryn Cooke
>            Priority: Minor
>
> Currently if you want to create a thread independent transaction you do:
> Transaction t = g.tx(); //My current transaction.
> Graph tg = t.create(); //Creating a new transaction.
> I know this may seem petty, but to me it says that I am creating a new transaction that is a child of the Transaction obtained via tx().
> Does this mean that if do:
> t.commit();
> it will commit all spawned transactions?
> Just thinking it would be nicer to have Graph.createTx() in addition to Graph.tx() that way it doesn't look like there is any hierarchy of transactions.
> Fully understand if others don't see it that way though.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)