[ http://jira.codehaus.org/browse/XDP-49?page=comments#action_38871 ] John Latham commented on XDP-49: --------------------------------
This now works perfectly. Thanks Anatol! > Support for union-subclass > -------------------------- > > Key: XDP-49 > URL: http://jira.codehaus.org/browse/XDP-49 > Project: XDoclet 2 Plugins > Type: New Feature > Components: hibernate > Versions: hibernate-1.0 > Environment: Win32, Eclipse IDE > Reporter: John Latham > Assignee: Anatol Pomozov > Attachments: XDoclet2Playpen.zip, XDoclet2PlaypenWithUnionSubclass.zip > > > Attached is my Eclipse project including unit tests. The model is a simple > Customer/Payment model, where Payment has three subclasses, as used in the > Hibernate Reference documentation. > There are currently two issues: > 1. Cascase creates don't work. I have annotated Customer (the parent) with > '@hibernate.set lazy="true" inverse="true" cascade="all"', but this isn't > propagated to Customer.hbm.xml when the mappings are generated. Consequently, > the relationship is only mapped from the Payment (child) class. > 2. There is not currently support for union-subclass. This is difficult for > me to write tests for, since I don't know what syntax to use. The mapping I > am aiming for is the "Table per concrete class" approach documented in > section 9.1.5. of the Hibernate reference doc. In the current project, I > instead use "Table per subclass, using a discriminator". > So, perhaps the steps are: > (a) Fix the cascade issue > (b) Implement union-subclass support. > (c) Change the xdoclet tags in this test project to implement "Table per > concrete class" using union-subclass. > (d) Maybe tweak the tests in this project. Sorry this is a bit vague, but > since I haven't used union-subclass I'm not quite sure what the test should > look like. The current tests (e.g. testPolymorphicAssociations) may do it. > I'm happy to help further with, perhaps when (a) and (b) are done I could do > (c) and (d). > Please tell me if my approach is wrong, this is the first open source project > I've been involved with! > Regards, > John Latham -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- 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_id=7393&alloc_id=16281&op=click _______________________________________________ xdoclet-plugins-interest mailing list xdoclet-plugins-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest