The following comment has been added to this issue:
Author: Andrew Stevens
Created: Tue, 8 Mar 2005 6:00 PM
Body:
What version of XDoclet?
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1291?page=comments#action_16092
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1291
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1291
Summary: xdoclet joined-subclass not creating mapping in superclass' xml
Type: Bug
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Hibernate Module
Assignee: xdoclet-devel (Use for new issues)
Reporter: J P
Created: Tue, 8 Mar 2005 1:43 PM
Updated: Tue, 8 Mar 2005 6:00 PM
Environment: Windows XP, Eclipse 3, Hibernate 2.1.8, Java 1.4.2_05, Oracle 9i
Description:
Hi,
I have 3 classes
1. OIDObject.java : generates sequence ID.
2. Error.java extends OIDObject : Superclass
3. WorkRequestError extends Error : Subclass
I am using "Table per Subclass".
Sequence ID generation is working fine.
Problem Description :
When I put @hibernate.joined-subclass and @hibernate.joined-subclass-key tags
in WorkRequesError.java, it is not creating "<Joined-subclass>" mapping in
superclass mapping file i.e. error.hbm.xml file.
Am I missing something here ?
My mapping file and Java classes are listed below.
Please Help !!!
Thanks
JP
============= OIDObject.java =======================
/**
* @hibernate.class
*/
public class OIDObject extends NumberedObject
{
protected Long OID;
public void setOID(Long oid)
{
OID = oid;
}
/**
* @hibernate.id
* column="oid"
* generator-class="sequence"
*
* @hibernate.generator-param
* name="sequence"
* value="SequenceName"
* @return
*/
public Long getOID()
{
return OID;
}
}
============== End OIDObject.java ====================
============== Error.java ==========================
/**
*
* @hibernate.class table="error"
*
*/
public class Error extends OIDObject
{
protected String message;
protected String description;
protected String errorMode;
protected String type;
/**
* @hibernate.property
* column="error_message"
* not-null="true"
*
*/
public String getMessage()
{
return message;
}
public void setMessage(String m)
{
message = m;
}
/**
* @hibernate.property
* column="description"
*
*/
public String getDescription()
{
return description;
}
public void setDescription(String desc)
{
description = desc;
}
/**
* @hibernate.property
* column="errormode"
* not-null="true"
*
*/
public String getErrorMode()
{
return errorMode;
}
public void setErrorMode(String errorMode)
{
this.errorMode = errorMode;
}
/**
* @hibernate.property
* column="error_type"
* not-null="true"
*
*/
public String getType()
{
return type;
}
public void setType(String newType)
{
type = newType;
}
}
============== End Error.java =======================
============== WorkRequestError.java =================
/**
* @hibernate.joined-subclass table="workreqerror"
* @hibernate.joined-subclass-key column="oid"
*
*/
public class WorkRequestError extends Error
{
protected WorkRequest workRequest;
/**
* @hibernate.many-to-one column="workrequestoid"
*
* @return
*/
public WorkRequest getWorkRequest()
{
return this.workRequest;
}
public void setWorkRequest(WorkRequest wreq)
{
this.workRequest = wreq;
}
}
============== End WorkRequestError.java ==============
============== Error.hbm.xml ==============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping
>
<class
name="Error"
table="error"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>
<id
name="OID"
column="oid"
type="java.lang.Long"
>
<generator class="sequence">
<param name="sequence">SequenceName</param>
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-Error.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>
<property
name="message"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="error_message"
not-null="true"
/>
<property
name="description"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="description"
/>
<property
name="errorMode"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="errormode"
not-null="true"
/>
<property
name="type"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="error_type"
not-null="true"
/>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Error.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>
============== End Error.hbm.xml ==============
---------------------------------------------------------------------
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 email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel