[xsd-users] Re: CodeSynthesis XSD + ODB
Boris Kolpackov
boris at codesynthesis.com
Thu Nov 5 03:40:20 EST 2015
Hi,
tsroynciitraoln <tsroynciitraoln at gmail.com> writes:
> I'm currently dealing with XSD schemas and database objects.
>
> I'm generating classes with Code Synthesis XSD, but I also need to persist
> those objects in a database.
>
> Is it possible to generate *.hpp and *.cpp files from XSD schemas with ODB
> support directly included?
No, there is no such support. Mapping a typical XML Schema to a sensible
relational model without a large amount of user input will be non-trivial.
See this email for more information:
http://www.codesynthesis.com/pipermail/odb-users/2012-May/000533.html
So the recommended approach would be to provide the ODB mapping manually.
You can do it completely non-intrusively, without modifying any of the
XSD-generated code, as shown at the beginning of Chapter 14, "ODB Pragma
Language" in the ODB manual.
Boris
More information about the xsd-users
mailing list