|
I forgot to mention that the patch didn't take into account any new features that the Hibernate 3 offers, unless the original code do it auto-magically base on the dtd files...
So if you're not using any of those new features then this can help you for the time being ;) My guess is that the JAR was compiled/built with JDK 5 and you're using JDK 1.4.2.
We'd like to make use of this patch as well. Would you mind re-compiling the .jar with a 1.4 target and attaching it to this issue? Thanks!
I would like to see a proper patch for this. I now have commit rights so I can work on this (I am busy at the moment) but using this patch as a starting point your help we can get this happening quickly.
Cheers David. Just a note to add that the
maven.xdoclet.hibernatedoclet.hibernate.0.Version=3.0 needs to be 3.0 for this drop in jar to actually generate the 3.0 mappings. In hindsight this might be obvious, but I was kinda thinking too literally when the earlier comment said it was a "drop-in" replacement. Is it possible to add all cascade options for H3 such as persist, merge, etc
Regards, Mark Thanks for the patch.
Yes - this is the start for supporting hibernate 3.x using XDoclet. If have added the functionality for generating the DTD reference lines in the configuration and the hbms. A new version property had to be added to the configuration sub task to do this propertly. Also added the DTDs to support verification and named them consisently with existing DTD files. This does not add any Hibernate 3.0 features. New requests should be created for these rather than keep this entry open.
BUG: tags insert and update not work in this .jar
This patch seems to have broken the support for property-ref element for hibernate.many-to-one tag! There may be other things broken, but I'm not sure.
XDoclet 1.2.3 also doesn't seem to have Hibernate3 support. Will there be an official version with H3 support anytime soon? New features are being driven by the community. Nothing is not on the table but there is no plan as such. I will periodically do work to add more H3 features. If a (good) patch is supplied for something then I will check then commit it. Create a new JIRA entry for the feature(s) you would like to see. A patch would be most helpful.
I've reopened this simply to accounting for some of the H3 related changes I'm comitting...
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Product.java,1.2,1.3 Human.java,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.53,1.54 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-formula.xdt,1.1,1.2 hibernate-joined-subclass.xdt,1.9,1.10 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-sql-delete.xdt,NONE,1.1 hibernate-sql-insert.xdt,NONE,1.1 hibernate-sql-update.xdt,NONE,1.1 hibernate-sql-update.xdt,NONE,1.1 hibernate-sql-insert.xdt,NONE,1.1 hibernate-subselect.xdt,NONE,1.1 hibernate-sql-delete.xdt,NONE,1.1 hibernate-loader.xdt,NONE,1.1 hibernate-column.xdt,NONE,1.1 hibernate-synchronize.xdt,NONE,1.1 hibernate-key.xdt,NONE,1.1 hibernate-subselect.xdt,NONE,1.1 hibernate-column.xdt,NONE,1.1 hibernate-properties.xdt,1.36,1.37 hibernate-collections.xdt,1.27,1.28 hibernate-any.xdt,1.1,1.2 hibernate-property.xdt,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-many-to-one.xdt,NONE,1.1 hibernate-properties.xdt,1.37,1.38 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 LineItem.java,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.54,1.55 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-key.xdt,NONE,1.1 hibernate-dynamic-component.xdt,NONE,1.1 hibernate-key.xdt,NONE,1.1 hibernate-join.xdt,NONE,1.1 hibernate-component.xdt,NONE,1.1 hibernate-joined-subclass.xdt,1.10,1.11 hibernate-properties.xdt,1.38,1.39 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.55,1.56 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,NONE,1.1 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-key.xdt,1.1,NONE CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate HibernateTagsHandler.java,1.41,1.42 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,1.3,1.4 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.56,1.57 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-one-to-one.xdt,NONE,1.1 hibernate-class.xdt,1.1,1.2 hibernate-properties.xdt,1.39,1.40 hibernate-join.xdt,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Animal.java,1.1,1.2 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-set.xdt,NONE,1.1 hibernate-parent.xdt,NONE,1.1 hibernate-properties.xdt,1.40,1.41 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.57,1.58 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-bag.xdt,NONE,1.1 hibernate-list.xdt,NONE,1.1 hibernate-properties.xdt,1.41,1.42 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.60,1.61 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.61,1.62 CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-map.xdt,NONE,1.1 hibernate-array.xdt,NONE,1.1 hibernate-map-key-many-to-many.xdt,NONE,1.1 hibernate-map-key.xdt,NONE,1.1 hibernate-composite-map-key.xdt,NONE,1.1 hibernate-primitive-array.xdt,NONE,1.1 hibernate-index-many-to-any.xdt,NONE,1.1 hibernate-key.xdt,1.2,1.3 hibernate-properties.xdt,1.42,1.43 I'm trying the CVS HEAD version of XDoclet, and I got the following error when running "hibernatedoclet":
[hibernatedoclet] xdoclet.XDocletException: Running XDoclet failed.: xdoclet.template.TemplateException: Error in template file: corresponding </XDtMethod:ifHasMethodTag> not found, line=3 of template file: file:/C:/Documents and Settings/dserodio/My Documents/Suzano/excelencia_reloaded/xdoclet/modules/hibernate/resources/hibernate-sql-insert$method.xdt Looking at hibernate-sql-insert$method.xdt, I can see that it's not "well-formed" XML, but I don't know how to fix it. The xdt files are scripts using an XML like syntax that were generating partial XML segments to the document overall is not pure XML thus they will not necessarily be balanced.
The problem was conditional typo on a number of the native SQL methods - fixed now. Try it out please. Thanks, David, I was a little to fast in my cut & paste :-)
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-comment.xdt,NONE,1.1 hibernate-joined-subclass.xdt,1.12,1.13 hibernate-query.xdt,1.6,1.7 hibernate-property.xdt,1.4,1.5 hibernate-properties.xdt,1.43,1.44 hibernate-many-to-one.xdt,1.3,1.4 hibernate-class.xdt,1.2,1.3 hibernate-component.xdt,1.1,1.2 hibernate-dynamic-component.xdt,1.1,1.2 hibernate-subclass.xdt,1.15,1.16 Major reorg finished, the rest will be handled case-by-case. Please open a new issue for any more Hibernate 3 related problems.
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-representation.xdt,NONE,1.1 hibernate-query.xdt,1.8,1.9 Paul - thank you for your hard work on this.
Great news!!! When can we expect a new XDoclet release with these features?
Changes of this magnitude will warrant a few beta releases first. I've still got a few more specific Hiberate 3 releated issues to work through, but hopefully in the next few weeks we can put something out ... that's pure speculation, of course :-)
Has there been progess on this?
Paul has done a great job with this and as such I consider it done. Open any new JIRA entries for issue that are found or enhancements etc. I do hope the release (assuming it will be 1.3.x) comes out very soon in the mean time use the CVS version.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
I've unit tested the generated .hbm.xml against my own code and everything seems fine.
Anyone interested can try to download this file and replace yours, it's built using 1.2.2 of XDoclet. Try it, if no problem then maybe I'll try to find out how to contribute the patch into the cvs (I'm not XDoclet developer).