Hi :) This post 'extends' the post XDT-1291 (http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1291), the 2 problems look very similar.
I am facing some problems generating mapping files. I'm using the following lib : - hibernate-2.1.7c.jar - xdoclet-1.2.3.jar - xdoclet-hibernate-module-1.2.3.jar - xdoclet-xdoclet-module-1.2.3.jar - xjavadoc-1.1.jar - commons-collections-2.1.1.jar - commons-logging-1.0.4.jar and the HibernateDocletTask and HibernateCfgSubTask tasks In a simple example, I have two classes in two different packages : - tests.parents.Parent.java which is the superclass ; - tests.enfants.PremierEnfant.java which extends Parent ; and I want to use the 'table-per-subclass' strategy. So I have added the following XDoclet tags in my source files : === package tests.parents; /** * @hibernate.class * table="PARENT" */ public class Parent { ... === and === package tests.enfants; import parents.Parent; /** * @hibernate.joined-subclass * table="PREMIER_ENFANT" * * @hibernate.joined-subclass-key * column="PREMIER_ENFANT_ID" */ public class PremierEnfant extends Parent { ... === If the two source files are present in the classpath of the <hibernatedoclet> task, everything works fine : I get Parent.hbm.xml which contains a <class> node and a <joined-subclass> sub-node, and hibernate.cfg.xml which contains two lines <mapping resource="..."/>. But this is not what I want ;) My problem is : if Parent.class and Parent.hbm.xml are packaged together in a JAR file in the classpath, PremierEnfant.hbm.xml is not generated and hibernate.cfg.xml contains no line <mapping resource="..."/>. In Gavin King's 'Hibernate in Action' (p. 105), it is written that you may use <subclass> and <joined-subclass> mapping elements in a separate file , as top-level elements, instead of <class>. You just have to declare the class that is extended (<joined-subclass name="tests.enfants.PremierEnfant" extends="tests.parents.Parent">). This technique is designed to allow you to extend a class hierarchy without modifyin mapping of the superclass. So, could someone help me (if it is possible) to generate with <hibernatedoclet> task : - PremierEnfant.hbm.xml which contains only a <joined-subclass> node ; with informations coming from : - Parent.class and Parent.hbm.xml located in a JAR file,in the classpath. Thanks in advance Eric, from Paris ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id344&op=click _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user