I have a rather complex schema that uses lots of nested, anon complex elements (interestingly enough, I am working on a bioinfomatics project - a complex field!).
I have configured to use MySQL and it seems to work great EXCEPT that the table and column names are getting huge, 70+ chars in length. The db will not accept this.
What is the most efficient strategy to change this? I have one XSD library with ~100 elements, and another 30 XSD that use that library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The way we've handled external constraints from databases is to just post-process the schema mappings. This is precisely what we did in our UniProtDB and GODB libraries, as each of those definition files produced mappings with which PostgreSQL wasn't happy. (e.g., PostgreSQL didn't like a field named "end," among others)
We haven't come up with a solution beyond that. In your case, its seems like a text-replace script will do the trick; replace the offending table and column names when acceptable substitutes. Then, make sure to run this script after every XSD library generation sequence.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It turns out that my XSD violated some Java constraints as well (like using 'Class' as an element name). Therefore, I just annotated the heck out of the XSD file with Hyperjaxb annotations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a rather complex schema that uses lots of nested, anon complex elements (interestingly enough, I am working on a bioinfomatics project - a complex field!).
I have configured to use MySQL and it seems to work great EXCEPT that the table and column names are getting huge, 70+ chars in length. The db will not accept this.
What is the most efficient strategy to change this? I have one XSD library with ~100 elements, and another 30 XSD that use that library.
Hi Tom,
The way we've handled external constraints from databases is to just post-process the schema mappings. This is precisely what we did in our UniProtDB and GODB libraries, as each of those definition files produced mappings with which PostgreSQL wasn't happy. (e.g., PostgreSQL didn't like a field named "end," among others)
We haven't come up with a solution beyond that. In your case, its seems like a text-replace script will do the trick; replace the offending table and column names when acceptable substitutes. Then, make sure to run this script after every XSD library generation sequence.
Thanks.
It turns out that my XSD violated some Java constraints as well (like using 'Class' as an element name). Therefore, I just annotated the heck out of the XSD file with Hyperjaxb annotations.