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/04/06 17:13:46 UTC
[cayenne] branch master updated (c946c19 -> caabb2d)
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 c946c19 Merge branch 'pull/416' into asf-master
new 05ec056 Bugfix: No methods for queries with qualifier parameters generated.
new 409228c Exception in dbimport when relationships should be imported, but no explicit import configuration exists.
new caabb2d CAY-2653 and CAY-2654 release notes
The 3 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:
RELEASE-NOTES.txt | 2 ++
.../main/java/org/apache/cayenne/gen/DataMapUtils.java | 2 +-
.../dbsync/reverse/dbload/RelationshipLoader.java | 16 +++++++++-------
3 files changed, 12 insertions(+), 8 deletions(-)
[cayenne] 01/03: Bugfix: No methods for queries with qualifier
parameters generated.
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 05ec056740646fdee69d15b3fc8c1e665794f9fd
Author: Ralf Schuchardt <ra...@gmx.de>
AuthorDate: Sat Apr 4 20:26:06 2020 +0200
Bugfix: No methods for queries with qualifier parameters generated.
Cgen should generate a perform-method for queries with qualifiers (e.g. "username = $ausername") stored in the datamap, but there is no method generated. Queries without qualifiers get a method.
If the alias map for Entity.lastPathComponent is null then an exception is thrown later in org.apache.cayenne.map.PathComponentIterator at the line "this.aliasMap = Objects.requireNonNull(aliasMap)". This means the qualifier is seen as invalid and therefore no perform-method is generated.
---
cayenne-cgen/src/main/java/org/apache/cayenne/gen/DataMapUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/DataMapUtils.java b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/DataMapUtils.java
index 8a8c41d..57b0ba3 100644
--- a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/DataMapUtils.java
+++ b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/DataMapUtils.java
@@ -179,7 +179,7 @@ public class DataMapUtils {
if (operand instanceof ASTObjPath) {
PathComponent<ObjAttribute, ObjRelationship> component = ((Entity) root).lastPathComponent(
- (ASTObjPath) operand, null);
+ (ASTObjPath) operand, Collections.emptyMap());
ObjAttribute attribute = component.getAttribute();
if (attribute != null) {
typeName = attribute.getType();
[cayenne] 03/03: CAY-2653 and CAY-2654 release notes
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 caabb2d022c887838712f1d36d562b7bb284351b
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Mon Apr 6 19:46:52 2020 +0300
CAY-2653 and CAY-2654 release notes
---
RELEASE-NOTES.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index ae62d85..8e19a74 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -112,6 +112,8 @@ CAY-2635 Lambda expressions break ROP serialization
CAY-2646 Wrong target path selection logic in cgen config
CAY-2647 Modeler: project upgrade from 4.0.B2 to 4.1.RC2 failure
CAY-2648 Whitespace symbols in JDBC Driver and DB URL lines lead to incorrect driver loading
+CAY-2653 No methods for queries with qualifier parameters generated
+CAY-2654 Exception in dbimport when relationships should be imported, but no explicit configuration exists
----------------------------------
Release: 4.1.B1
[cayenne] 02/03: Exception in dbimport when relationships should be
imported, but no explicit import configuration exists.
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 409228cdbe9fe67055fa4ac13f9a4966f773fc5e
Author: Ralf Schuchardt <ra...@gmx.de>
AuthorDate: Sat Apr 4 20:57:38 2020 +0200
Exception in dbimport when relationships should be imported, but no explicit import configuration exists.
If there is no explicit configuration (included or excluded tables) then sourceTableFilter in RelationshipFilter.checkAndAddRelationship is null and a NullPointerException is thrown.
This is an inconsistent behaviour, because without importing relationships the dbimport itself does work otherwise.
---
.../dbsync/reverse/dbload/RelationshipLoader.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
index d30f682..2bd96ce 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
@@ -120,7 +120,7 @@ public class RelationshipLoader extends AbstractLoader {
.tableFilter(relationship.getTargetEntity().getCatalog(), relationship.getTargetEntity().getSchema());
// check that relationship can be included
- if(!sourceTableFilter.getIncludeTableRelationshipFilter(entity.getName())
+ if(sourceTableFilter != null && !sourceTableFilter.getIncludeTableRelationshipFilter(entity.getName())
.isIncluded(relationship.getName())) {
return;
}
@@ -131,12 +131,14 @@ public class RelationshipLoader extends AbstractLoader {
return;
}
- // check that all join attributes are included
- for(DbJoin join : relationship.getJoins()) {
- if(!sourceTableFilter.getIncludeTableColumnFilter(entity.getName()).isIncluded(join.getSourceName()) ||
- !targetTableFilter.getIncludeTableColumnFilter(relationship.getTargetEntityName()).isIncluded(join.getTargetName())) {
- return;
- }
+ if(sourceTableFilter != null && targetTableFilter != null) {
+ // check that all join attributes are included
+ for(DbJoin join : relationship.getJoins()) {
+ if(!sourceTableFilter.getIncludeTableColumnFilter(entity.getName()).isIncluded(join.getSourceName()) ||
+ !targetTableFilter.getIncludeTableColumnFilter(relationship.getTargetEntityName()).isIncluded(join.getTargetName())) {
+ return;
+ }
+ }
}
// add relationship if delegate permit it