Issue Details (XML | Word | Printable)

Key: XDT-1257
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: xdoclet-devel (Use for new issues)
Reporter: David Channon
Votes: 7
Watchers: 9
Operations

If you were logged in you would be able to see more operations.
XDoclet

Hibernate 3.x support for XDoclet 1.2.x

Created: 01/Feb/05 12:08 AM   Updated: 10/May/06 05:56 PM
Component/s: Hibernate Module
Affects Version/s: 1.2.2
Fix Version/s: 1.3

Time Tracking:
Not Specified

File Attachments: 1. Java Archive File xdoclet-hibernate-module-1.2.2.h3.for142.jar (54 kB)
2. Java Archive File xdoclet-hibernate-module-1.2.2.h3.jar (53 kB)
3. PDF File xdoclet122_hibernate3_qpatch.tar.bz2 (2 kB)

Environment: Hibernate 3.0
Issue Links:
Depends
 


 Description  « Hide
Currently XDoclet 1.2.x does not support hibernate 3.0 - I would like this support added. I understand that XDoclet 2.0 has started with some support but it does not have all the plugins that 1.2.x has thus I request that this occurs.

I am a member of the Hibernate team and as such I am willing to start the work for this support (as I require it for my current project). Obviously I will require commit access to the hibernate module to do the work. Thank you in advance. email: david at hibernate.org




 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
T.Y. Lim added a comment - 21/Mar/05 08:27 AM
So I haven't got a permission to work on this issue, but I've done a quick patch to get the following generated when I specify <hibernate version=3.0/> :

<!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).

T.Y. Lim added a comment - 21/Mar/05 08:50 AM
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 ;)

Joe Dunne added a comment - 21/Mar/05 12:06 PM
I tried your jar file, and this is the error I am getting:
java.lang.UnsupportedClassVersionError: xdoclet/modules/hibernate/HibernateDocletTask (Unsupported major.minor version 49.0)

Am I missing something?

Matt Raible added a comment - 21/Mar/05 12:14 PM
My guess is that the JAR was compiled/built with JDK 5 and you're using JDK 1.4.2.

Joe Dunne added a comment - 21/Mar/05 12:15 PM
I am using JDK 1.4.2

Tim Kettering added a comment - 21/Mar/05 02:25 PM
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!

David Channon added a comment - 21/Mar/05 05:41 PM
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.

T.Y. Lim added a comment - 22/Mar/05 01:02 AM
compiled with jdk1.4.2

T.Y. Lim added a comment - 22/Mar/05 01:03 AM
patch files for xdoclet 1.2.2

Tim Kettering added a comment - 22/Mar/05 09:13 AM
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.

Mark Eagle added a comment - 23/Mar/05 12:00 PM
Is it possible to add all cascade options for H3 such as persist, merge, etc

Regards,

Mark

David Channon added a comment - 23/Mar/05 03:57 PM
Thanks for the patch.
Yes - this is the start for supporting hibernate 3.x using XDoclet.

David Channon added a comment - 03/Apr/05 05:27 AM
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.


Bruno Braga added a comment - 14/Apr/05 12:13 PM
BUG: tags insert and update not work in this .jar

Rishabh Misra added a comment - 20/Apr/05 08:40 AM
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?

dan added a comment - 02/May/05 10:54 AM
In the cvs for hibernate doclet, there seems to be no support for filters or filter-def. Is there a plan to have these features?

David Channon added a comment - 02/May/05 06:06 PM
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.

Paul Galbraith added a comment - 20/May/05 09:06 AM
I've reopened this simply to accounting for some of the H3 related changes I'm comitting...

Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: joined-subclass and many subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.53,1.54
XDT-1257: joined-subclass and many subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: joined-subclass and many subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: joined-subclass and many subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: many-to-one and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 LineItem.java,1.1,1.2
XDT-1257: many-to-one and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.54,1.55
XDT-1257: many-to-one and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: join and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.55,1.56
XDT-1257: join and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,NONE,1.1
XDT-1257: join and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources hibernate-key.xdt,1.1,NONE
XDT-1257: join and subelements aligned with hibernate 3.0 DTD


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/xdoclet/modules/hibernate HibernateTagsHandler.java,1.41,1.42
XDT-1257: allow for standard hibernate type names in id tag


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,1.1,1.2
XDT-1257: allow for standard hibernate type names in id tag


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Person.java,1.3,1.4
XDT-1257: join implementation fixed -- join elements now generated after standard properties; one-to-one element for Hibernate3


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.56,1.57
XDT-1257: join implementation fixed -- join elements now generated after standard properties; one-to-one element for Hibernate3


Paul Galbraith added a comment - 02/Jul/05 11:41 AM
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
XDT-1257: join implementation fixed -- join elements now generated after standard properties; one-to-one element for Hibernate3


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/samples/src/java/test/hibernate30 Animal.java,1.1,1.2
XDT-1257: add hibernate 3 attributes for set element


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
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
XDT-1257: add hibernate 3 attributes for set element


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.57,1.58
XDT-1257: add hibernate 3 attributes for set element


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
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
XDT-1257: add hibernate 3 attributes for list and bag


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.60,1.61
XDT-1257: add hibernate 3 attributes for list and bag


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.61,1.62
XDT-1257: add hibernate 3 attributes for map, array, primitive-array, some documentation clean up


Paul Galbraith added a comment - 02/Jul/05 11:42 AM
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
XDT-1257: add hibernate 3 attributes for map, array, primitive-array, some documentation clean up


Daniel Serodio added a comment - 13/Jul/05 04:11 PM
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.

David Channon added a comment - 13/Jul/05 06:34 PM
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.

Paul Galbraith added a comment - 18/Jul/05 08:47 AM
Thanks, David, I was a little to fast in my cut & paste :-)

Paul Galbraith added a comment - 19/Jul/05 04:41 PM
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
XDT-1422, add @hibernate.properties tag to create <properties> element.
XDT-1257 add more H3 element mappings


Paul Galbraith added a comment - 19/Jul/05 06:42 PM
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/modules/hibernate/src/META-INF xtags.xml,1.63,1.64
XDT-1422, add @hibernate.properties tag to create <properties> element.
XDT-1257 add more H3 element mappings


Paul Galbraith added a comment - 26/Jul/05 04:47 PM
Major reorg finished, the rest will be handled case-by-case. Please open a new issue for any more Hibernate 3 related problems.

Paul Galbraith added a comment - 26/Jul/05 05:59 PM
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
XDT-1257: add H3 hibernate-representation tag


David Channon added a comment - 26/Jul/05 06:35 PM
Paul - thank you for your hard work on this.

Daniel Serodio added a comment - 27/Jul/05 09:43 AM
Great news!!! When can we expect a new XDoclet release with these features?

Paul Galbraith added a comment - 28/Jul/05 08:13 AM
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 :-)

michael epstein added a comment - 10/May/06 02:39 PM
Has there been progess on this?

David Channon added a comment - 10/May/06 05:56 PM
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.