The following comment has been added to this issue:
Author: Chien-Hsing Wu
Created: Sat, 25 Sep 2004 11:55 AM
Body:
I tried to follow the patch creation command described in JIRA but The source
directory I accessed using [EMAIL PROTECTED]:/cvsroot/xdoclet/xdoclet2 did not contain
any source code. I could only get the README file and it points me to
xdoclet.codehaus.org that again it's empty.
With limit time for the project I am working on, sorry that I do not have time to
further dig in to create patch file. Please find the changes in the attached three
files:
1)
xdoclet-1.2.1\modules\hibernate\src\xdoclet\modules\hibernate\HibernateTagsHandler.java
2)
xdoclet-1.2.1\modules\hibernate\src\xdoclet\modules\hibernate\resources\hibernate-column.xdt
3)
xdoclet-1.2.1\modules\hibernate\src\xdoclet\modules\hibernate\resources\hibernate-properties.xdt
These files also added the feature to support specifying formula instead of column
name in the property tag.
For example:
....
/**
* @hibernate.property
* not-null="true"
* formula="Process_SID"
* insert="false"
* update="false"
*/
protected int getProcessSid() {
......
}
....
Should generate the following hbm element:
<property
name="processSid"
type="int"
update="false"
insert="false"
access="property"
formula="Process_SID"
not-null="true"
/>
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1079?page=comments#action_14945
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1079
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1079
Summary: Allow hibernate.component to specify a index prefix
Type: Improvement
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Hibernate Module
Versions:
1.2.1
Assignee: xdoclet-devel (Use for new issues)
Reporter: Chien-Hsing Wu
Created: Tue, 21 Sep 2004 5:52 PM
Updated: Sat, 25 Sep 2004 11:55 AM
Description:
Related to XDT-733.
Let's say we have a component:
public class PersonKey {
private String id;
private String type
...
/**
* @hibernate.property
* @hibernate.column
* name="ID"
* index="PERSON_INDEX"
*
* @return Returns the id.
*/
public String getId() {
return id;
}
....
/**
* @hibernate.property
* @hibernate.column
* name="TYPE"
* index="PERSON_INDEX"
*
* @return Returns the type.
*/
public String getType() {
return type;
}
...
}
If this component is used in more than one entity, the index name should be different.
public class Insured {
...
/**
* @hibernate.component
* prefix="INSURED_"
* index-prefix="IDX_INSURED_"
*/
public PersonKey getPersonKey() {
...
}
public class Employee {
...
/**
* @hibernate.component
* prefix="EMPLOYEE_"
* index-prefix="IDX_EMPLOYEE_"
*/
public PersonKey getPersonKey() {
...
}
This should cause the columns generated for "presonKey" to be prefixed with "INSURED_"
and the index name prefixed with "IDX_INSURED_".
Like the following element for Insured.hbm.xml :
<component
name="resourceKey"
class="....PersonKey"
>
<property
name="id"
type="java.lang.String"
update="true"
insert="true"
access="property"
>
<column
name="INSURED_ID"
index="IDX_INSURED_PERSON_INDEX"
/>
</property>
<property
name="type"
type="java.lang.String"
update="true"
insert="true"
access="property"
>
<column
name="INSURED_TYPE"
index="IDX_INSURED_PERSON_INDEX"
/>
</property>
</component>
---------------------------------------------------------------------
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
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel