Bookmark Topic Watch Topic
  • New Topic

Java object persistance

 
Mahesh Bamane
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Report post to moderator
In case I persist the object and later on change the defination of the class, how can retrieve the object in this scenario?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Report post to moderator
We would need to know more details before we can give a sensible answer. What are you saving? How? Serialisation? Beans and XML file? Databases?
 
Mahesh Bamane
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks Ritchie for your reply.

To explain, I've Class Car whose object I persist using java serialization mechanism; later on I go and change the class defination of a Car. Now I want to deserialize the class object. How this scenario should be handled as I've changed the class defination and now want retrive the object but it's stored as per the old class defination.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Googling java serialization version control might help.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of this thread. Locking this one, please continue the discussion on the other thread.
 
    Bookmark Topic Watch Topic
  • New Topic