-
1. Re: Surviving refactorings
sannegrinovero Jul 28, 2011 5:00 PM (in response to jmfaerman)Hi,
yes that's something we have to live with.
Hibernate OGM dehidradates the entities in their simple primitives, so it avoids the problem. So does the Hiberante 2nd level cache: it doesn't store the entities directly, which has the nice side effect of making them immutable and avoiding references to user application code.
Generally objects are either primitives (like people storing String instances), or you create a custom Externalizer to control the binary format: it's then up to you to be able to maintain backwards compatibility for your own code: when you change a class, you can choose how to deal with the old object format, possibly updating it on the fly to a default value, or dropping the value. Also, nothing prevents you to encode your data in flexible object formats like JSON.
https://docs.jboss.org/author/display/ISPN/Plugging+Infinispan+With+User+Defined+Externalizers