cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [2/2] cayenne git commit: deprecated API
Date Tue, 21 Apr 2015 09:45:34 GMT
deprecated API


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/5ad9e9ff
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/5ad9e9ff
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/5ad9e9ff

Branch: refs/heads/master
Commit: 5ad9e9ff82f608b22901ecc0ee19a874766e2e6e
Parents: 27a99fa
Author: aadamchik <aadamchik@apache.org>
Authored: Tue Apr 21 12:45:22 2015 +0300
Committer: aadamchik <aadamchik@apache.org>
Committed: Tue Apr 21 12:45:22 2015 +0300

----------------------------------------------------------------------
 .../cayenne/access/translator/select/SelectTranslator.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/5ad9e9ff/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/SelectTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/SelectTranslator.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/SelectTranslator.java
index 1b54a50..632a5e5 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/SelectTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/SelectTranslator.java
@@ -24,6 +24,7 @@ import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.jdbc.ColumnDescriptor;
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.exp.parser.ASTDbPath;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.DbAttribute;
@@ -415,7 +416,7 @@ public class SelectTranslator extends QueryAssembler {
             // for each relationship path add PK of the target entity...
             for (String path : ((PrefetchSelectQuery) query).getResultPaths()) {
 
-                ASTDbPath pathExp = (ASTDbPath) oe.translateToDbPath(Expression.fromString(path));
+                ASTDbPath pathExp = (ASTDbPath) oe.translateToDbPath(ExpressionFactory.exp(path));
 
                 // add joins and find terminating element
 
@@ -468,7 +469,7 @@ public class SelectTranslator extends QueryAssembler {
 
                 // for each prefetch add all joins plus columns from the target
                 // entity
-                Expression prefetchExp = Expression.fromString(prefetch.getPath());
+                Expression prefetchExp = ExpressionFactory.exp(prefetch.getPath());
                 ASTDbPath dbPrefetch = (ASTDbPath) oe.translateToDbPath(prefetchExp);
 
                 resetJoinStack();


Mime
View raw message