Hello everyone - This is my first post and was wondering what the best way (or recommendation) for changing mappings dynamically.
What I have is a MS Db (or multiples) from a 3rd party and depending on the version of the application, the hibernate mappings need to change.
For example: Table 1 tells me the version of the application and when Table 1 says 11, then the type column in Table 2 means (say) Object X, but when Table one says 12, then the type column in Table 2 means Object Y.
My goal is to read the version from Table 1 and when it's 11 then map (subclasses actually) Object X to type 1, Object Y to type 2.
But when Table 1 says it's 12 I need to switch the subclass mapping to Object X to type 1 and Object Z to type 2, switching Object Y from 2 to 3.
Let me know if I need to post more details.
|