john john guthrie wrote: > well, the generated code looks a lot different from my current data model > ... > > 1) lots of enumerations for attributes that are, er, enumerated in the > schema that i hadn't bothered to "lock down" in the model (i.e. i had them > as strings). that's fine, of course (it's a good thing, actually) ;-)
> 2) i did have everything underscore-separated in the schema and camel-cased > in the data model. I do not think there's anything that can be done about this. castor simply takes your XML artefact names literal. > 3) i also had all my lists of child objects as that - lists. but in the xml > i defined that as a 'choice' of sequences, so that became a list of lists. > fair enough, that is what the xsd really translates to > > so nothing to stop me, but its more work than i had hoped for (it's a fairly > big data model) How many e.g. types ? > one other thing. i tried to set the generateMapping property in the ant task > to 'yes'. it's a documented option, but the ant task complained > that generateMapping was not an option. i looked at the ant task and sure > enough, there is a _generateMapping boolean, but no setter for it. so i > added one and rebuilt. the task ran fine, but if it gerneated the mapping > file i don't know where it did so. can you please file a bug about this ? > > thanks > > john > > On Wed, Dec 3, 2008 at 9:01 AM, Werner Guttmann <[EMAIL PROTECTED]>wrote: > >> let me know about your progress. >> >> Werner >> >> john guthrie wrote: >>> using the source generator would be preferable from a maintenance view as >>> well i'm now thinking. i'm setting up the ant task now, i'll post when i >>> make some progress. >>> >>> thanks. >>> >>> john >>> >>> On Wed, Dec 3, 2008 at 8:04 AM, Werner Guttmann <[EMAIL PROTECTED] >>> wrote: >>> >>>> john, >>>> >>>> If that's the case, this should be 100% achievable. Castor XML (code >>>> generator) generates 100& POJOs from the XML schema. It should be >>>> straight-forward to map those to a relational database using Hibernate. >>>> If you happen to have problems with this, I'd like to know. >>>> >>>> Werner >>>> >>>> john guthrie wrote: >>>>> On Wed, Dec 3, 2008 at 7:46 AM, Werner Guttmann < >> [EMAIL PROTECTED] >>>>> wrote: >>>>> >>>>>>> i could see what castor generates and maybe >>>>>>> coerce that into something hibernate likes i guess >>>>>> When you say generate, I assume you are talking about (un)marshalling >> to >>>>>> and from XML, right ? >>>>>> >>>>> my goof, i was talking about using the source code generator, as you >>>>> suggested, and seeing how far that is from what hibernate likes. >>>>> john >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

