-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: XDoclet and custom types
PostPosted: Sat Oct 18, 2003 5:31 am 
Newbie

Joined: Mon Sep 01, 2003 5:10 am
Posts: 7
Location: Freiburg, Germany
Hi,

I've just switched to using XDoclet in conjunction with Hibernate, and come across a little stumbling block. Whilst trying to integrate the AuditInfo pattern (verbatim) to one of my classes, it is not generating the correct mapping. XDoclet tags as follows:

Code:
/**
* @hibernate.property type="AuditInfoType"
*/
public AuditInfo getAuditInfo() {
   return auditInfo;
}

public void setAuditInfo(AuditInfo value) {
   auditInfo = value;
}


Unfortunately, xdoclet is not including the 4 columns required ie. it is generating:

Code:
<property
   name="auditInfo"
   type="de.tuerkas.tmarket.hibernate.audit.AuditInfoType"
   update="true"
   insert="true"
   column="auditInfo"
/>


instead of something along the lines of:

Code:
<property name="auditInfo" type="AuditInfoType">
   <column name="LAST_UPDATED"/>
   <column name="CREATED"/>
   <column name="UPDATED_BY"/>
   <column name="CREATED_BY"/>
</property>


I've searched through the doco's, obviously without success. If anyone could give me a pointer, that would be great.

TIA,

John


Top
 Profile  
 
 Post subject: Sorry, just figured this one out...
PostPosted: Sat Oct 18, 2003 6:12 am 
Newbie

Joined: Mon Sep 01, 2003 5:10 am
Posts: 7
Location: Freiburg, Germany
The solution seems to be:

Code:
/**
* @hibernate.property type="AuditInfoType"
* @hibernate.column name="lastUpdated"
* @hibernate.column name="created"
* @hibernate.column name="updatedBy"
* @hibernate.column name="createdBy"
*/


Very cool, this xdoclet thang.

- John


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 19, 2003 1:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
That is exactly how I have done it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.