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 04:13 PM MST #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
« November 2008
SunMonTueWedThuFriSat
      
1
2
3
6
7
8
9
10
11
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today

Recent Entries

Tag Cloud