20031124 Monday November 24, 2003

[Hibernate] Generating composite-id code using XDoclet It's been a while since I dug into the guts of XDoclet and Hibernate. Now I'm digging in on my new project to figure out the best way to generate a <composite-id> entry in my .hbm.xml files. If you know something about Hibernate and XDoclet, please read my questions on the Hibernate Forums. Posted in Java at Nov 24 2003, 12:41:12 PM MST 1 Comment

Comments:

I created a DomainObjCompId class for my DomainObj and added this above the setter: @hibernate.id type="domain.package.DomainObjCompId". XDoclet added the correct <composite-id> tag to the DomainObj.hbm.xml. I believe that you must create the custom compid class. XDoclet checks the type to determine if its a comp id. See: http://xdoclet.sourceforge.net/templates/Hibernate.html#ifHasCompositeId Jason

Posted by Jason Boutwell on November 24, 2003 at 05:13 PM MST #

Post a Comment:
  • HTML Syntax: Allowed