Hello,
I have seen on this list that some of you were able to use the joined-subclass xdoclet tags for hibernate inheritance (in occurence Derek Chen-Becker). I have tried but am not obtaining the expected result. Does-anybody have a working example of their doclet tags for the inherited class and the subclass using the joined-subclass?
Otherwise can anybody tell me what I am doing wrong:
I am unable to generate the proper configuration files using xdoclet for inheritance (joined-subclass).
I have a class Person which inherits ContactInfo and I want to have the following mapping in my ContactInfo.hbm.xml:
<class name="ContactInfo" table="CONTACT_INFO"> <id name="id" type="long" column="CONTACT_ID"> <generator class="native"/> </id> <property name="email" column="EMAIL"/> ... <joined-subclass name="Person" table="PERSON"> <key column="PERSON_ID"/> ... </joined-subclass> ... </class>
I therefore add the following xdoclet tags at the class level of Person:
/** * * @hibernate.class * table="PERSON" * @hibernate.joined-subclass * @hibernate.joined-subclass-key column="CONTACT_INFO_FK" */ public class Person extends com.agencebraque.util.contact.entities.ContactInfo {... }
Unfortunately I don't get the expected mapping. Instead of having the one I specified above, there is no difference in ContactInfo.hbm.xml (that there would be had I not used inheritance) but in Person.hbm.xml, the attributes and associations of ContactInfo are included.
Of course this is not what I am looking for. Anybody have an idea what xdoclet tags I have to put to get the joined-subclass inheritance because I figure I'm not using the tags correctly?
Otherwise if you could direct me to samples which use inheritance with hibernate and xdoclet I would very much appreciate it.
Thank you very much,
Francois
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user