Message:
The following issue has been reopened.
Reopener: Heiko W. Rupp
Date: Mon, 15 Nov 2004 8:49 AM
There seem to be the need to further investigate this.
For which I have no time at all. That's why I also
re-assign it back to public.
---------------------------------------------------------------------
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:
XDoclet Module
Versions:
1.2.1
Assignee: xdoclet-devel (Use for new issues)
Reporter: Kenneth Aitken
Created: Sun, 26 Sep 2004 10:13 AM
Updated: Mon, 15 Nov 2004 8:49 AM
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: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel