You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2020/11/04 11:46:17 UTC

[cayenne] branch master updated (b3ae66d -> 814cce5)

This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git.


    from b3ae66d  CAY-2686 SQL translator incorrectly quotes fully qualified tables' names
     new 1bc3ae2  Ignore type reported by metadata and use only type name, as some drivers or DBs (e.g. mysql 5.x) could report here incorrect type.
     new 814cce5  Open constructor for the extension

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../cayenne/dbsync/merge/context/EntityMergeSupport.java       | 10 +++++-----
 .../java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)


[cayenne] 01/02: Ignore type reported by metadata and use only type name, as some drivers or DBs (e.g. mysql 5.x) could report here incorrect type.

Posted by nt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git

commit 1bc3ae2281d17a5a323b596e507ba6fb2fd71fe5
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Wed Nov 4 14:44:51 2020 +0300

    Ignore type reported by metadata and use only type name, as some drivers or DBs (e.g. mysql 5.x) could report here incorrect type.
---
 .../cayenne/dbsync/merge/context/EntityMergeSupport.java       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
index 93c9a25..46be314 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
@@ -298,12 +298,12 @@ public class EntityMergeSupport {
         }
 
         // Check additional common DB types, like 'json' or 'geometry'
-        if(dbAttribute.getType() == Types.OTHER) {
-            if(dbAttribute instanceof DetectedDbAttribute) {
-                DetectedDbAttribute detectedDbAttribute = (DetectedDbAttribute)dbAttribute;
-                String jdbcTypeName = detectedDbAttribute.getJdbcTypeName();
+        if(dbAttribute instanceof DetectedDbAttribute) {
+            DetectedDbAttribute detectedDbAttribute = (DetectedDbAttribute)dbAttribute;
+            String jdbcTypeName = detectedDbAttribute.getJdbcTypeName();
+            if(jdbcTypeName != null) {
                 String type = SQL_ADDITIONAL_TYPES_TO_JAVA_TYPE.get(jdbcTypeName.toLowerCase());
-                if(type != null) {
+                if (type != null) {
                     return type;
                 }
             }


[cayenne] 02/02: Open constructor for the extension

Posted by nt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git

commit 814cce596681c606ce2f5725e00b47573c81f751
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Wed Nov 4 14:46:01 2020 +0300

    Open constructor for the extension
---
 .../src/main/java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java
index c1cfe7d..2f6fb0d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLTreeProcessor.java
@@ -46,7 +46,7 @@ public class MySQLTreeProcessor extends TypeAwareSQLTreeProcessor {
         return INSTANCE;
     }
 
-    private MySQLTreeProcessor() {
+    protected MySQLTreeProcessor() {
         registerProcessor(NodeType.LIKE, (ChildProcessor<LikeNode>) this::onLikeNode);
         registerProcessor(NodeType.LIMIT_OFFSET, (ChildProcessor<LimitOffsetNode>) this::onLimitOffsetNode);
         registerProcessor(NodeType.FUNCTION, (ChildProcessor<FunctionNode>) this::onFunctionNode);