• Post Reply Bookmark Topic Watch Topic
  • New Topic

use for this

 
harish kadamudi
Greenhorn
Posts: 2
Android Hibernate MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Long msgId = (Long) session.save(message);
why we are using the above statement ?
what is Long msgId ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to guess this question is about Hibernate? If so, this should explain all.
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi harish,

save() will call Save your session, based on a given object's identity value.
and it returns the generated identifier.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!