Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Versioning with OXM(Concerns OXMapping of the same kind of Business Object)
Versioning with OXM [message #1239105] Mon, 03 February 2014 06:22
Pëtr Andreev is currently offline Pëtr Andreev
Messages: 3
Registered: January 2014
Junior Member
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?
Thank you!
Previous Topic:Dynamic Moxy Exception for createContextFromXSD
Next Topic:JAXBErrorHandler#warning
Goto Forum:
  


Current Time: Sat Apr 19 21:40:14 EDT 2014

Powered by FUDForum. Page generated in 0.02836 seconds