openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Linskey <plins...@gmail.com>
Subject Re: svn commit: r646377 - /openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
Date Wed, 09 Apr 2008 15:21:13 GMT
Hi,

What is the impact of this change for the following pair of classes:

     @Entity @NamedQuery(name="findAll", query="select item from  
LineItem item")
     public class LineItem { ... }

     @Entity @NamedQuery(name="findAll", query="select p from Person p")
     public class Person { ... }

The system should fail to parse that pair of classes. Do we have a  
test case that asserts that that's the case? Also, why are we doubly- 
parsing these named queries?

In other words, does this change just mask some larger problem?

-Patrick

On Apr 9, 2008, at 9:31 AM, allee8285@apache.org wrote:
> Author: allee8285
> Date: Wed Apr  9 07:31:30 2008
> New Revision: 646377
>
> URL: http://svn.apache.org/viewvc?rev=646377&view=rev
> Log:
> OPENJPA-565 - Ignore duplicate NamedQuery definition and continue to  
> parse the remaining entries in NamedQueries definition.
>
> Modified:
>    openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/ 
> apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
>
> Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/ 
> org/apache/openjpa/persistence/ 
> AnnotationPersistenceMetaDataParser.java
> URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=646377&r1=646376&r2=646377&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/ 
> apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java  
> (original)
> +++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/ 
> apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java  
> Wed Apr  9 07:31:30 2008
> @@ -1567,7 +1567,7 @@
>             if (meta != null) {
>                 if (_log.isWarnEnabled())
>                     _log.warn(_loc.get("dup-query", query.name(),  
> el));
> -                return;
> +                continue;
>             }
>
>             meta = getRepository().addQueryMetaData(null,  
> query.name());
> @@ -1608,7 +1608,7 @@
>             if (meta != null) {
>                 if (_log.isWarnEnabled())
>                     _log.warn(_loc.get("dup-query", query.name(),  
> el));
> -                return;
> +                continue;
>             }
>
>             meta = getRepository().addQueryMetaData(null,  
> query.name());
>
>

-- 
Patrick Linskey
202 669 5907





Mime
View raw message