|Versioning with OXM [message #1239105]
||Mon, 03 February 2014 11:22
| Pëtr Andreev
Registered: January 2014
Hello, i have a fundamental question (im looking for a kind of Best Practice) about OXMapping: imagine we have a business object (BO) which is mapped to XML using MOXy OXM-binding with xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm".|
Then we have a relationship:
org.abc.BO <-> bo-oxm-v0.xml(<xml-bindings package-name="org.abc") <-> XML (version 0)
The question is: what is the best way to change the mapping of XML(v1) and provide a new bo-oxm-v1.xml while still supporting the old version of XML (v0). Both OXMs would map at least two different XML-inputs to the same BO, bringing down different XML-Formats to the common denominator (BO) in that way.
The only chance i can figure out right now is to use a versioning at the package level like:
org.abc.v0.BO <-> bo-oxm-v0.xml(package-name="org.abc.v0") <-> XML (version 0)
org.abc.v1.BO <-> bo-oxm-v1.xml(package-name="org.abc.v1") <-> XML (version 1)
org.abc.vX.BO <-> bo-oxm-vX.xml(package-name="org.abc.vX") <-> XML (version X)
Is it a right way or are there some other options?
Powered by FUDForum
. Page generated in 0.03807 seconds