[ http://jira.jboss.com/jira/browse/JBAS-319?page=history ]
     
Scott M Stark closed JBAS-319:
------------------------------

    Resolution: Incomplete Description

Reopen with a valid forum reference or complete description.

> bug with [ 644394 ] support for cmr+cmp
> ---------------------------------------
>
>          Key: JBAS-319
>          URL: http://jira.jboss.com/jira/browse/JBAS-319
>      Project: JBoss Application Server
>         Type: Bug
>   Components: CMP service
>     Reporter: SourceForge User
>     Assignee: Scott M Stark

>
>
> SourceForge Submitter: jwhiteside .
> I descovered a potential problem with patch 644394 
> described in the following 
> forum:http://jboss.org/forums/thread.jsp?
> forum=46&thread=25017. If this is not the proper place to 
> post this, please let me know.
> I have successfully applied the patch but am still receiving 
> a "duplicate column name". After digging through the 
> patched code I noticed that the cmpFieldsByName Map on 
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge 
> contains field names as keys. When the 
> getCMPFieldByName(cnames[ndx]) method is invoked 
> within the loadUniqueCMPCMRFieldSet() method of the 
> same class, an array containing column names is passed 
> in. Since the Map contains field names and the argument 
> contains column names, this method always returns null 
> causing both the cmp and the cmr field to be added to the 
> insert causing the duplicate column name.
> I fixed the problem in my case by changing the 
> JDBCEntityBridge.loadUniqueCMPCMRFieldSet() code 
> from:
> String cnames[] = cmrField.getJDBCType
> ().getColumnNames();
>   for (int ndx = 0; ndx < cnames.length; ndx++) {
>      if (getCMPFieldByName(cnames[ndx]) == null)   {
>         uniqueList.add(cmrField);
>       }
> to:
> if (getCMPFieldByName(cmrField.getFieldName()) == null) {
>   uniqueList.add(cmrField);
> }
> Can sombody verify that this is a defect and advise me as 
> to how to get the patch updated?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/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
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to