--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
>  Hi, 
> 
> I have 2 questions about using xdoclet with
> hibernate:
> 1. How can I use xdoclet to generate the
> "hibernate.cfg.xml" file? 

you can not.  but this file is not worth generating. 
it's not so heavily dependent on your sources.

> 2. How to generate the column mapping for id in my
> <class>.cfg.xml file,
> like this in the hibernate 'Cat' example:
> <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 putting in the xdoclet tag in my Cat.java, 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 missing.
> */ 
> 
> this is what I get in the generated Cat.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> 

Which column? Your primary key mapping was generated (
and that was whyt you asked for ).

If you like to map your properties, you shall use
@hibernate.property on respective getters.


regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to