Hi,
I have 2 questions about using xdoclet with hibernate.
1. how can I use hibernate to generate the hibernate.cfg.xml file?
2. how to generate the column mapping for id in my <class>.cfg.xml file:
<id name="id" type="string" unsaved-value="null" >
<column name="CAT_ID" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
I try this, but what I put in the xdoclet, but the column mapping does not generate
/* @hibernate.id generator-class="uuid.hex" column="CAT_ID" unsaved-value="null"
* @hibernate.column name="CAT_ID" sql-type="char(32)" not-null="true"
*/
this is what I get in the generated <class>.cfg.xml file (there is no 'column' children under 'id'):
<id
name="id"
column="CAT_ID"
type="java.lang.String"
unsaved-value="null"
>
<generator class="uuid.hex">
</generator>
</id>
I read the hibernate workshop presentation, but that does seems to answer my question. So I appreciate someone can help me.
Thanks in advance.
|