You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Teresa Kan (JIRA)" <ji...@apache.org> on 2007/11/14 19:56:43 UTC

[jira] Updated: (OPENJPA-442) JIRA-407 introduced backward compatibility problem in QueryImpl

     [ https://issues.apache.org/jira/browse/OPENJPA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Teresa Kan updated OPENJPA-442:
-------------------------------

    Attachment: OPENJPA-442.patch

attach the patch.

> JIRA-407 introduced backward compatibility problem in QueryImpl
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-442
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-442
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.1.0
>            Reporter: Teresa Kan
>             Fix For: 1.1.0
>
>         Attachments: OPENJPA-442.patch
>
>
> In the openjpa-407 patch, it changed the constructor to pass an extra parameter RuntimeExceptionTransaltor,
>    public QueryImpl(EntityManagerImpl em, RuntimeExceptionTranslator ret,
>         org.apache.openjpa.kernel.Query query) {
>         _em = em;
>         _query = new DelegatingQuery(query, ret);
>     }
> However, it did not keep the orginial constructor so the extension  of this QueryImpl from other vendor resulted in compiler error. We need to keep the backward compatibilty issue in mind when we change the public interface. 
> The solution will be  to add the original constructor back and route it to the new constructor:
>    public QueryImpl(EntityManagerImpl em, RuntimeExceptionTranslator ret,
>         org.apache.openjpa.kernel.Query query) {
>         _em = em;
>         if (ret == null)
>             ret = PersistenceExceptions.getRollbackTranslator(em);
>         _query = new DelegatingQuery(query, ret);
>     }
>     /**
>      * Constructor; supply factory and delegate.
>      */
>     public QueryImpl(EntityManagerImpl em, org.apache.openjpa.kernel.Query query) {        
>         this(em, null, query);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.