OPENJPA-570 - Model after the AnnotationPersistenceMetaDataParser.parsePackageAnnotations(), an extra test is performed in parseClassAnnotations() method for the Named*Quer* annotations to see if the MODE_QUERY has been performed before by examining the meta.getSourceMode() before the actualNamed*Queries() method is invoked.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@648275 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2008-04-15 15:12:11 +00:00
parent 07cd1728a1
commit 31c47a6c04
1 changed files with 4 additions and 4 deletions

View File

@ -534,20 +534,20 @@ public class AnnotationPersistenceMetaDataParser
meta.setObjectIdType(((IdClass) anno).value(), true);
break;
case NATIVE_QUERIES:
if (isQueryMode())
if (isQueryMode() && (meta.getSourceMode() & MODE_QUERY) == 0)
parseNamedNativeQueries(_cls,
((NamedNativeQueries) anno).value());
break;
case NATIVE_QUERY:
if (isQueryMode())
if (isQueryMode() && (meta.getSourceMode() & MODE_QUERY) == 0)
parseNamedNativeQueries(_cls, (NamedNativeQuery) anno);
break;
case QUERIES:
if (isQueryMode())
if (isQueryMode() && (meta.getSourceMode() & MODE_QUERY) == 0)
parseNamedQueries(_cls, ((NamedQueries) anno).value());
break;
case QUERY:
if (isQueryMode())
if (isQueryMode() && (meta.getSourceMode() & MODE_QUERY) == 0)
parseNamedQueries(_cls, (NamedQuery) anno);
break;
case SEQ_GENERATOR: