Hi,

I think I found a bug related to hibernate inheritance. I was adding the mappings to my subclass (@hibernate.joined-subclass and @hibernate.joined-subclass-key) and nothing was generated in my parent class mapping. It should have generated a <joined-buclass> tag at the end of the parent <class> tag.

After going throgh the xdoclet code I figured out that the problem came from the fact that my POJO classes were divised in two. For example I have a class Car that inherits from CarBase. I keep the getters and setters in the "Base" class and the rest of the logic go in the "implementation". I also had Vehicle and VehicleBase classes. Therefore CarBase inherits from Vehicle.

The problem is in the method forAllSubClasses (class HibernateTagHandler) which only looks for one level of inheritance. Therefore when in the class Vehicle, it looks for potential subclasses through the source classes. In my example, the source classes are Car and Vehicle. Since CarBase inherits from Vehicle and not Car, the method never sees Car as being a subclass.

To workaround this problem I have to combine Car with CarBase in a single class. I shouldn't have to do this. The forAllSubclasses should look recursively through the childs and generate all the information it sees in the subclasses. Therefore, if there are properties in the implementation class as well as the base class, they should all be taken in account in the resulting mapping file.

Is this making sense? I tried making the change but didn't understand how the push, generate and pop methods work.... Could anybody give me a tip on how to do this change or if anyone knows exactly how to do it, to do it?

Thanks a lot ,

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

Reply via email to