You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Omar Irbouh (JIRA)" <ib...@incubator.apache.org> on 2005/05/31 16:05:53 UTC

[jira] Commented: (IBATIS-139) Discriminator being applied to incorrect resultmaps

     [ http://issues.apache.org/jira/browse/IBATIS-139?page=comments#action_66618 ]
     
Omar Irbouh commented on IBATIS-139:
------------------------------------

I experienced the same thin in my current project.
Since I use discriminator only in one sqlmap file, I put that file in the bottom of my config file. That was the work arround I found. I must confess that I was very lucky since the sql map file has no dependencies on others files.

> Discriminator being applied to incorrect resultmaps
> ---------------------------------------------------
>
>          Key: IBATIS-139
>          URL: http://issues.apache.org/jira/browse/IBATIS-139
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: MS Windows XP Professional, JDK 1.3
>     Reporter: Geoff Chiang

>
> The new discriminator/submap functionality is breaking resultmaps that are processed after the one that the discriminator defined in.  Once a discriminator tag is encountered during the initial parsing of the resultmaps, a Discriminator object is created and held in the 'discriminator' attribute of the parser's 'vars' object (vars is an instance of BaseParse.Variables).  This Discriminator object is then applied to the enclosing resultmap at SqlMapParser:288.  However, the discriminator is never reset to null, resulting in it also being applied to all resultmaps processed after that initial definition.
> See the mailing list thread at http://www.mail-archive.com/ibatis-user-java@incubator.apache.org/msg02500.html for more details of the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira