The following issue has been updated:
Updater: Andrew Stevens (mailto:[EMAIL PROTECTED])
Date: Sun, 23 Jan 2005 6:03 PM
Changes:
Version changed to 1.2.2
Component changed to JBoss Module
Component changed from XDoclet Module
---------------------------------------------------------------------
For a full history of the issue, see:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1084?page=history
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1084
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1084
Summary: Incorrect jdbc-type/sql-type mapping with JBoss relation-tables
Type: Bug
Status: Reopened
Priority: Blocker
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
JBoss Module
Versions:
1.2.1
1.2.2
Assignee: xdoclet-devel (Use for new issues)
Reporter: Kenneth Aitken
Created: Sun, 26 Sep 2004 10:13 AM
Updated: Sun, 23 Jan 2005 6:03 PM
Environment: Windows XP, Eclipse 3.0.0, JBoss 3.2.5
Description:
When I have a many-to-many relationship with two foreign keys, one CHAR(32) and
one INTEGER, and want to map it for JBoss using XDoclet, I add the following (I
am using SERIAL with PostgreSQL and therefore need to specify the foreign key
data types):
In BeanA:
/**
* @ejb.interface-method
* view-type="local"
* @ejb.relation
* name = "beana-beanb"
* role-name = "beana-has-beanbs"
* @jboss.relation
* related-pk-field = "beanbID"
* fk-column = "beanbID"
* jdbc-type = "INTEGER"
* sql-type = "INTEGER"
* @jboss.relation-mapping
* style = "relation-table"
public abstract java.util.Set getBeanBs ( );
.
.
In BeanB:
/**
* @ejb.interface-method
* view-type="local"
* @ejb.relation
* name = "beana-beanb"
* role-name = "beanb-has-beanas"
* @jboss.relation
* related-pk-field = "beanaID"
* fk-column = "beanaID"
* jdbc-type="CHAR"
* sql-type = "CHAR(32)"
* @jboss.relation-mapping
* style = "relation-table"
*/
public abstract java.util.Set getBeanAs ( );
.
.
But in the jbosscmp-jdbc.xml, the relationship comes out as:
<ejb-relation>
<ejb-relation-name>beana-beanb</ejb-relation-name>
<relation-table-mapping>
</relation-table-mapping>
<ejb-relationship-role>
<ejb-relationship-role-name>beana-has-beanbs</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>beanaID</field-name>
<column-name>beanaID</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>beanb-has-beanas</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>beanbID</field-name>
<column-name>beanbID</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</key-field>
</key-fields>
</ejb-relationship-role>
</ejb-relation>
The jdbc-type="CHAR" and sql-type = "CHAR(32)" are completely ignored and
INTEGER is used for both fields of the relation table. The same thing occurred
for me with @jboss.target-relation.
---------------------------------------------------------------------
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: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel