[XDoclet-JIRA] Commented: (XDT-1489) prefix attribute of @hibernate.component tag not working

[email protected]
Newsgroups gmane.comp.java.xdoclet.devel
Message-ID <[email protected]>
The following comment has been added to this issue:

     Author: Vinayak Chitragar
    Created: Tue, 2 Aug 2005 7:42 AM
       Body:
This is not an issue. It started working after including @hibernate.property tag for each of the attributes of property class. Regret the inconvenience.

---------------------------------------------------------------------
View this comment:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1489?page=comments#action_17098

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1489

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-1489
    Summary: prefix attribute of @hibernate.component tag not working
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             XDoclet Module
   Versions:
             1.2.3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Vinayak Chitragar

    Created: Tue, 2 Aug 2005 7:09 AM
    Updated: Tue, 2 Aug 2005 7:42 AM
Environment: Windows XP, eclipse3.1, jdk1.4.2_08, xdoclet 1.2.3

Description:
I have a class with a component DateRange as an attribute which has two properties - start and end dates. 

The persistent class has two attributes of type DateRange - accessibleTime and effectivityPeriod. 

While generating mapping file for this class, when I use the hibernatedoclet tag along with prefix option on the accessibleTime and effectivityPeriod attributes, the mapping file generated contains column names without any prefix and the DDL generated only picks up start_dt & end_dt for one time without any prefixes. 

The code is given below. While searching for help on the net, I stumbled upon a bug XDT-1013 which is exactly similar to what I am observing.  

Please provide a fix for this or let me know if the fix already exists.
************************** 
Java Code for Persistent class 

public class ContactPerson { 

private DateRange accessibleTime; 
private DateRange effectivityPeriod; 
private Integer objectID; 

/** 
* @hibernate.id column="ObjectID" generator-class="sequence" 
* 
*/ 
public Integer getObjectID() { 
return objectID; 
} 

/** 
* @param String 
*/ 
public void setPartyID(Integer partyID) { 
this.objectID = partyID; 
} 

/** 
* @hibernate.component class="nl.rabobank.rn.cpl.bec.party.DateRange" prefix="acc" 
*/ 
public DateRange getAccessibleTime() { 
return accessibleTime; 
} 

public void setAccessibleTime(DateRange accessibleTime) { 
this.accessibleTime = accessibleTime; 
} 

/** 
* @hibernate.component class="nl.rabobank.rn.cpl.bec.party.DateRange" prefix="eff" 
*/ 
public DateRange getEffectivityPeriod() { 
return effectivityPeriod; 
} 

public void setEffectivityPeriod(DateRange effectivityPeriod) { 
this.effectivityPeriod = effectivityPeriod; 
} 
} 
********************* 
Java code for component class - 

import java.sql.Timestamp; 
public class DateRange { 
private Timestamp startDate; 
private Timestamp endDate; 
public Timestamp getEndDate() { 
return endDate; 
} 
public void setEndDate(Timestamp endDate) { 
this.endDate = endDate; 
} 
public Timestamp getStartDate() { 
return startDate; 
} 
public void setStartDate(Timestamp startDate) { 
this.startDate = startDate; 
} 
} 
********************* 
Generated Hibernate File 
<hibernate-mapping> 
<class name="com.test" table="ContactPerson"> 

<id name="objectID" column="ObjectID" type="java.lang.Integer"> 
<generator class="sequence"/> 
</id> 

<component name="accessibleTime" class="nl.rabobank.rn.cpl.bec.party.DateRange"> 
<property name="endDate" type="java.sql.Timestamp" update="true" insert="true" column="end_dt"/> 
<property name="startDate" type="java.sql.Timestamp" update="true" insert="true" column="start_dt"/> 
</component> 

<component name="effectivityPeriod" class="nl.rabobank.rn.cpl.bec.party.DateRange"> 
<property name="endDate" type="java.sql.Timestamp" update="true" insert="true" column="end_dt"/> 
<property name="startDate" type="java.sql.Timestamp" update="true" insert="true" column="start_dt"/> 
</component> 
</class> 
</hibernate-mapping> 
********************* 
Generated DDL - 

create table ContactPerson (ObjectID number(10,0) not null, end_dt timestamp, start_dt timestamp, primary key (ObjectID)) 
********************* 



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.