This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

optimistic locking  RSS feed

 
Rashmi Goyal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....I am new to hibernate. I want to use automatic versioning and according to hibernate documentation in 10.4.2, I should call session.connection.commit.

so my question is what is the difference in between session.connection().commit and transaction.commit.

and when to use which commit.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think session.connection.commit() will discontinue your session, and transaction.connection.commit() will discontinue your transaction.
[ October 07, 2004: Message edited by: adeel ansari ]
 
Rashmi Goyal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks adeel.

For automatic versioning , do i have to discontinue session.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!