openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r485804 - in /incubator/openjpa/trunk/openjpa-kernel/src/main: java/org/apache/openjpa/kernel/ExpressionStoreQuery.java resources/org/apache/openjpa/kernel/localizer.properties
Date Mon, 11 Dec 2006 18:41:31 GMT
Author: awhite
Date: Mon Dec 11 10:41:30 2006
New Revision: 485804

URL: http://svn.apache.org/viewvc?view=rev&rev=485804
Log:
Improved error message.


Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java?view=diff&rev=485804&r1=485803&r2=485804
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
Mon Dec 11 10:41:30 2006
@@ -638,8 +638,10 @@
         public DataStoreExecutor(ExpressionStoreQuery q,
             ClassMetaData meta, boolean subclasses,
             ExpressionParser parser, Object parsed) {
-            _meta = meta;
             _metas = q.getIndependentExpressionCandidates(meta, subclasses);
+            if (_metas.length == 0)
+                throw new UserException(_loc.get("query-unmapped", meta));
+            _meta = meta;
             _subs = subclasses;
             _parser = parser;
 

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties?view=diff&rev=485804&r1=485803&r2=485804
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
Mon Dec 11 10:41:30 2006
@@ -231,6 +231,7 @@
     select and having clauses must only include aggregates or values that also \
     appear in your grouping clause.
 query-nosupport: The "{0}" query type does not support this operation.
+query-unmapped: You cannot query unmapped type "{0}".
 range-too-big: The range of the query is too big. Start index: "{0}", end \
 	index: "{1}". The range must be less than Integer.MAX_VALUE.
 invalid-range: The query range from {0} to {1} is not valid.



Mime
View raw message