[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1489?page=all ]
     
Paul Galbraith resolved XDT-1489:
---------------------------------

    Resolution: Won't Fix

> prefix attribute of @hibernate.component tag not working
> --------------------------------------------------------
>
>          Key: XDT-1489
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1489
>      Project: XDoclet
>         Type: Bug
>   Components: XDoclet Module
>     Versions: 1.2.3
>  Environment: Windows XP, eclipse3.1, jdk1.4.2_08, xdoclet 1.2.3
>     Reporter: Vinayak Chitragar
>     Assignee: xdoclet-devel (Use for new issues)

>
>
> 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)) 
> ********************* 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to