polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [5/7] polygene-java git commit: POLYGENE-222 - Fixed a Identity conversion problem.
Date Fri, 07 Apr 2017 08:23:58 GMT
POLYGENE-222 - Fixed a Identity conversion problem.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/8931fb27
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/8931fb27
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/8931fb27

Branch: refs/heads/develop
Commit: 8931fb27b5c38ce09fe374da260207dd8aadd0ba
Parents: 47d2ad6
Author: niclas <niclas@spicter.com>
Authored: Tue Apr 4 10:02:48 2017 +0800
Committer: niclas <niclas@spicter.com>
Committed: Tue Apr 4 10:02:48 2017 +0800

----------------------------------------------------------------------
 .../index/sql/support/skeletons/AbstractSQLQuerying.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/8931fb27/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
index 4b2cc22..331e034 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
@@ -36,6 +36,7 @@ import org.apache.polygene.api.common.QualifiedName;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.identity.HasIdentity;
+import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.injection.scope.Uses;
@@ -988,15 +989,17 @@ public abstract class AbstractSQLQuerying
                     QualifiedName qName
                         = QualifiedName.fromAccessor( predicate.property().accessor() );
                     String columnName;
+                    Object value;
                     if( qName.type().equals( HasIdentity.class.getName() ) )
                     {
                         columnName = DBNames.ENTITY_TABLE_IDENTITY_COLUMN_NAME;
+                        value = predicate.value().toString();
                     }
                     else
                     {
                         columnName = DBNames.QNAME_TABLE_VALUE_COLUMN_NAME;
+                        value = predicate.value();
                     }
-                    Object value = predicate.value();
                     modifyFromClauseAndWhereClauseToGetValue(
                         qName, value, predicate,
                         negationActive, lastTableIndex,
@@ -1393,8 +1396,7 @@ public abstract class AbstractSQLQuerying
         return this.findFromLookupTables( SQL_OPERATORS, null, predicate, false );
     }
 
-    protected JoinType
-    getTableJoinStyle( Predicate<Composite> predicate, Boolean negationActive )
+    protected JoinType getTableJoinStyle( Predicate<Composite> predicate, Boolean negationActive
)
     {
         return this.findFromLookupTables( JOIN_STYLES, NEGATED_JOIN_STYLES, predicate,
                                           negationActive );
@@ -1428,8 +1430,7 @@ public abstract class AbstractSQLQuerying
         return result;
     }
 
-    protected QuerySpecificationBuilder
-    getBuilderForPredicate( SQLVendor vendor, String tableAlias )
+    protected QuerySpecificationBuilder getBuilderForPredicate( SQLVendor vendor, String
tableAlias )
     {
         QueryFactory q = vendor.getQueryFactory();
         ColumnsFactory c = vendor.getColumnsFactory();


Mime
View raw message