Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

remote objects

 
Jez Nicholson
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using my Hibernate objects remotely by serialising/deserialising. When the server receives an object back from the client can it associate it with an object in it's cache? or will it complain because they are different instantiations of the same object?
 
Gavin King
author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Session.saveOrUpdate() or Session.saveOrUpdateCopy() to reuse the object in a new session.
 
Christian Bauer
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both is possible and sometimes needed: See the documentation of saveOrUpdate() and saveOrUpdateCopy() (yes, they will be renamed soon...) on the Session API.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic