Werner Guttmann wrote:

Justin,

if you were to use Castor JDO as persistance framework, the solution would be simple: write a mapping file for the classes generated, and map them to the corresponding tables.

Werner

On Fri, 09 Jul 2004 11:12:12 -0400, Justin Permar wrote:



TWIMC,

What I would like to do is start with an XML schema, generate an object via the source generator that is persistable. As an example, generate an object with appropriate xdoclet tags in the file so that it is persistable via hibernate. The goal is a seamless persistence mechanism for all XML data. Is such a thing possible with current castor (or possible with some modification, such as generation of hibernate xdoclet tags in the generated objects that can then be processed to produce hibernate mapping files)?
Thanks in advance.


Justin



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev







----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




I believe (correct me if I'm wrong) that the same solution would work for Hibernate. However, I'm really looking for a way to generate that mapping file (there currently is no database schema that I have to adhere to, so any mapping is fair game). The actual persistence implementation is unimportant to me, so if generating the mapping for Castor JDO is easier, that's excellent.

It may be that what I'm actually looking for is a mapping from XML schema to java objects to relational schema. It seems JAXB/Castor generator solves the XML -> Java objects side of things, and Castor JDO/Hibernate solves the Java objects -> persistence problem, but the java objects in each case are different. I'm interested in generating a Java object from the XML schema that can also be used directly for persistence. If there is any work going on this area, I would appreciate any and all pointers (or if you know this problem is currently not being tackled, please let me know so I can get started trying some things out). I'm especially in any standards in that area, so as to avoid the brittleness of serialization.

Justin



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to