[jira] [Updated] (CAY-2587) SQLServer Limit Offset convertation

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2587:
-
Fix Version/s: 4.2.M3

> SQLServer Limit Offset convertation 
> 
>
> Key: CAY-2587
> URL: https://issues.apache.org/jira/browse/CAY-2587
> Project: Cayenne
>  Issue Type: Bug
>  Components: Core Library
>Affects Versions: 4.2.M1
>Reporter: Konstantin
>Priority: Major
> Fix For: 4.2.M3
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Now cayenne query for SQLServer Limit/Offset converts to 'top (Limit+Offset)'.
> I think we should convert it to:
> OFFSET n ROWS
> FETCH NEXT k ROWS ONLY;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (CAY-2661) NPE on DB Import screen

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2661.

  Assignee: Nikita Timofeev
Resolution: Fixed

https://github.com/apache/cayenne/commit/bfd7b356fe2aee09b6fc34cf520f29ccb4f58a62

> NPE on DB Import screen
> ---
>
> Key: CAY-2661
> URL: https://issues.apache.org/jira/browse/CAY-2661
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.2.M1
>Reporter: Andrus Adamchik
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.2.M3
>
>
> There are some preconditions to this exception that I can't reproduce 
> anymore. I was playing with regex for DB Import table name match, and the 
> Modeler was misbehaving somehow (wouldn't let me enter certain forms of 
> regex, etc). Then I deleted that probelmatic include and tried to add a new 
> one. That's when the exception happened.
> {noformat}
> CayenneModeler Info
> Version: 4.2.M1
> Build Date: Apr 07 2020 08:40:10
> Exception: 
> =
> java.lang.NullPointerException
> at 
> org.apache.cayenne.modeler.action.dbimport.TreeManipulationAction.canBeInserted(TreeManipulationAction.java:157)
> at 
> org.apache.cayenne.modeler.action.dbimport.AddIncludeTableAction.performAction(AddIncludeTableAction.java:54)
> at 
> org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:171)
> at 
> java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
> at 
> java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
> at 
> java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
> at 
> java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
> at 
> java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
> at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
> at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
> at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
> at java.desktop/java.awt.Component.processEvent(Component.java:6397)
> at java.desktop/java.awt.Container.processEvent(Container.java:2263)
> at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
> at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
> at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
> at 
> java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
> at 
> java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
> at 
> java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
> at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
> at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2762)
> at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
> at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
> at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
> at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
> at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
> at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
> at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
> at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
> at 
> java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
> at 
> java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
> at 
> java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
> at 
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
> at 
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
> at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[cayenne] branch master updated: CAY-2661 release notes

2021-02-24 Thread ntimofeev
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


The following commit(s) were added to refs/heads/master by this push:
 new dda8c48  CAY-2661 release notes
dda8c48 is described below

commit dda8c4870f679c10730673fa8d2eaa1bc401e3f4
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:31:53 2021 +0300

CAY-2661 release notes
---
 RELEASE-NOTES.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 3b7131c..5b821b1 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -19,6 +19,7 @@ CAY-2692 Add entity lifecycle callbacks via annotated methods
 
 Bug Fixes:
 
+CAY-2661 NPE on DB Import screen
 CAY-2683 Don't use DISTINCT for joins on to-one related tables
 CAY-2685 JsonType should use the actual JDBC type, not OTHER
 CAY-2686 SQL translator incorrectly quotes fully qualified tables' names



[jira] [Closed] (CAY-2677) Custom Class Generation Templates for Embeddables and DataMaps

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2677.

Resolution: Fixed

*4.1*: 
https://github.com/apache/cayenne/commit/3ad81a8f0fe77b64b95029fe77942f8d50e9dc9c

> Custom Class Generation Templates for Embeddables and DataMaps
> --
>
> Key: CAY-2677
> URL: https://issues.apache.org/jira/browse/CAY-2677
> Project: Cayenne
>  Issue Type: Improvement
>  Components: cgen, Modeler
>Affects Versions: 4.1
>Reporter: Stefan S.
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.1.1, 4.2.M3
>
> Attachments: cayenne_modeler_additional_template_selection.diff
>
>
> Customization of code generation templates is vitual for production-ready 
> projects to apply appropriate file headers, meet coding guidelines, and for 
> other reasons.
> Therefore Cayenne Modeler shall support selection of custom templates for 
> generation Embeddables and DataMap Java classes, as it does for Object 
> Entities.
> This requires enhancements storing DataMap specific settings.
>  
> The attached patch provides a basic implementation of that feature (plus some 
> minor bug-fixes) in Modeler as well as cgen. Other dependencies to cgen - if 
> there are any - are not tackled. The coding style aims following present code 
> although some parts (e.g. template or checkbox handling) could generalized.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (CAY-2698) EventSubject.getSubject() is not thread safe

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev closed CAY-2698.

Resolution: Fixed

* *4.2* 
https://github.com/apache/cayenne/commit/71a9ea9c38d3dd8cff65780a579cf99a760da663
* *4.1* 
https://github.com/apache/cayenne/commit/8a5498880badf6f24b8e367291e8e424a76346d1

> EventSubject.getSubject() is not thread safe
> 
>
> Key: CAY-2698
> URL: https://issues.apache.org/jira/browse/CAY-2698
> Project: Cayenne
>  Issue Type: Bug
>  Components: Core Library
>Affects Versions: 4.1, 4.2.M2
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.1.1, 4.2.M3
>
>
> {{EventSubject.getSubject()}} method uses static Map that is not thread safe 
> to store data and this could cause a {{ConcurrentModificationException}}.
> See this thread for details: 
> https://lists.apache.org/thread.html/r751b3380c2aabded9346cadd0c9743b1134b851c9f8cc6128e55baa3%40%3Cuser.cayenne.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[cayenne] 01/02: CAY-2698 EventSubject.getSubject() is not thread safe

2021-02-24 Thread ntimofeev
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 71a9ea9c38d3dd8cff65780a579cf99a760da663
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:25:03 2021 +0300

CAY-2698 EventSubject.getSubject() is not thread safe
---
 .../org/apache/cayenne/event/EventSubject.java | 34 ++
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java 
b/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
index 99c8b43..7cc0fdc 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
@@ -40,8 +40,7 @@ import org.apache.cayenne.util.WeakValueMap;
 public class EventSubject implements Serializable {
 
 // a Map that will allow the values to be GC'ed
-@SuppressWarnings("unchecked")
-private static Map _registeredSubjects = new 
WeakValueMap<>();
+private static final Map _registeredSubjects = new 
WeakValueMap<>();
 
 // Subject identifier in the form "com.foo.bar/SubjectName"
 private String _fullyQualifiedSubjectName;
@@ -64,10 +63,14 @@ public class EventSubject implements Serializable {
 }
 
 String fullSubjectName = subjectOwner.getName() + "/" + subjectName;
-EventSubject newSubject = _registeredSubjects.get(fullSubjectName);
-if (newSubject == null) {
-newSubject = new EventSubject(fullSubjectName);
-_registeredSubjects.put(newSubject.getSubjectName(), newSubject);
+
+EventSubject newSubject;
+synchronized (_registeredSubjects) {
+newSubject = _registeredSubjects.get(fullSubjectName);
+if(newSubject == null) {
+newSubject = new EventSubject(fullSubjectName);
+_registeredSubjects.put(fullSubjectName, newSubject);
+}
 }
 
 return newSubject;
@@ -92,8 +95,7 @@ public class EventSubject implements Serializable {
 @Override
 public boolean equals(Object obj) {
 if (obj instanceof EventSubject) {
-return _fullyQualifiedSubjectName.equals(((EventSubject) obj)
-.getSubjectName());
+return _fullyQualifiedSubjectName.equals(((EventSubject) 
obj).getSubjectName());
 }
 
 return false;
@@ -101,7 +103,9 @@ public class EventSubject implements Serializable {
 
 @Override
 public int hashCode() {
-return new HashCodeBuilder(17, 
3).append(_fullyQualifiedSubjectName).toHashCode();
+return new HashCodeBuilder(17, 3)
+.append(_fullyQualifiedSubjectName)
+.toHashCode();
 }
 
 public String getSubjectName() {
@@ -114,15 +118,7 @@ public class EventSubject implements Serializable {
  */
 @Override
 public String toString() {
-StringBuilder buf = new StringBuilder(64);
-
-buf.append("<");
-buf.append(this.getClass().getName());
-buf.append(" 0x");
-buf.append(Integer.toHexString(System.identityHashCode(this)));
-buf.append("> ");
-buf.append(_fullyQualifiedSubjectName);
-
-return buf.toString();
+return "<" + this.getClass().getName() + " 0x" + 
Integer.toHexString(System.identityHashCode(this)) + "> "
++ _fullyQualifiedSubjectName;
 }
 }



[cayenne] 02/02: CAY-2698 release notes

2021-02-24 Thread ntimofeev
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 b9d0aa1da5151ecf787eee61fcc4fbf51f4ff1bc
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:27:38 2021 +0300

CAY-2698 release notes
---
 RELEASE-NOTES.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 2edf04d..3b7131c 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -25,6 +25,7 @@ CAY-2686 SQL translator incorrectly quotes fully qualified 
tables' names
 CAY-2687 Modeler Migrate Repeatedly Asks to Set Column Type for MySQL
 CAY-2690 dbimport skips length changes for BINARY and VARBINARY columns
 CAY-2691 MySQL driver 8.0.x stores LocalDateTime differently than 5.1.x
+CAY-2698 EventSubject.getSubject() is not thread safe
 
 --
 Release: 4.2.M2



[cayenne] 01/03: CAY-2677 Custom Class Generation Templates for Embeddables and DataMaps applying patch from Stefan S, see JIRA issue

2021-02-24 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

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

commit 3ad81a8f0fe77b64b95029fe77942f8d50e9dc9c
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:24:42 2021 +0300

CAY-2677 Custom Class Generation Templates for Embeddables and DataMaps
applying patch from Stefan S, see JIRA issue
---
 .../org/apache/cayenne/gen/CgenConfiguration.java  |  6 ++
 .../apache/cayenne/gen/xml/CgenConfigHandler.java  | 43 ++
 .../cayenne/modeler/CodeTemplateManager.java   | 92 +
 .../modeler/editor/cgen/CustomModeController.java  | 75 +
 .../modeler/editor/cgen/CustomModePanel.java   | 93 +-
 5 files changed, 274 insertions(+), 35 deletions(-)

diff --git 
a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java 
b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
index 2f6e2e4..eb2c822 100644
--- a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
+++ b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
@@ -396,6 +396,12 @@ public class CgenConfiguration implements Serializable, 
XMLSerializable {
 .simpleTag("mode", this.artifactsGenerationMode.getLabel())
 .simpleTag("template", this.template)
 .simpleTag("superTemplate", this.superTemplate)
+.simpleTag("template", this.template)
+.simpleTag("superTemplate", this.superTemplate)
+.simpleTag("embeddableTemplate", this.embeddableTemplate)
+.simpleTag("embeddableSuperTemplate", 
this.embeddableSuperTemplate)
+.simpleTag("queryTemplate", this.queryTemplate)
+.simpleTag("querySuperTemplate", this.querySuperTemplate)
 .simpleTag("outputPattern", this.outputPattern)
 .simpleTag("makePairs", Boolean.toString(this.makePairs))
 .simpleTag("usePkgPath", Boolean.toString(this.usePkgPath))
diff --git 
a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenConfigHandler.java 
b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenConfigHandler.java
index 6a80f91..0a41a04 100644
--- 
a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenConfigHandler.java
+++ 
b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenConfigHandler.java
@@ -43,6 +43,10 @@ public class CgenConfigHandler extends 
NamespaceAwareNestedTagHandler{
 private static final String GENERATION_MODE_TAG = "mode";
 private static final String SUBCLASS_TEMPLATE_TAG = "template";
 private static final String SUPERCLASS_TEMPLATE_TAG = "superTemplate";
+private static final String EMBEDDABLE_TEMPLATE_TAG = "embeddableTemplate";
+private static final String EMBEDDABLE_SUPER_TEMPLATE_TAG = 
"embeddableSuperTemplate";
+private static final String QUERY_TEMPLATE_TAG = "queryTemplate";
+private static final String QUERY_SUPER_TEMPLATE_TAG = 
"querySuperTemplate";
 private static final String OUTPUT_PATTERN_TAG = "outputPattern";
 private static final String MAKE_PAIRS_TAG = "makePairs";
 private static final String USE_PKG_PATH_TAG = "usePkgPath";
@@ -97,6 +101,17 @@ public class CgenConfigHandler extends 
NamespaceAwareNestedTagHandler{
 case SUPERCLASS_TEMPLATE_TAG:
 createSuperclassTemplate(data);
 break;
+case EMBEDDABLE_TEMPLATE_TAG:
+   createEmbeddableTemplate(data);
+   break;
+case EMBEDDABLE_SUPER_TEMPLATE_TAG:
+   createEmbeddableSuperTemplate(data);
+case QUERY_TEMPLATE_TAG:
+   createQueryTemplate(data);
+   break;
+case QUERY_SUPER_TEMPLATE_TAG:
+   createQuerySuperTemplate(data);
+break;
 case OUTPUT_PATTERN_TAG:
 createOutputPattern(data);
 break;
@@ -165,6 +180,34 @@ public class CgenConfigHandler extends 
NamespaceAwareNestedTagHandler{
 }
 configuration.setSuperTemplate(template);
 }
+
+private void createEmbeddableTemplate(String template) {
+   if(template.trim().length() == 0) {
+   return;
+   }
+   configuration.setEmbeddableTemplate(template);
+}
+
+private void createEmbeddableSuperTemplate(String template) {
+   if(template.trim().length() == 0) {
+   return;
+   }
+   configuration.setEmbeddableSuperTemplate(template);
+}
+
+private void createQueryTemplate(String template) {
+   if(template.trim().length() == 0) {
+   return;
+   }
+   configuration.setQueryTemplate(template);
+}
+
+private void createQuerySuperTemplate(String template) {
+   if(template.trim().length() == 0) {
+   return;
+   

[cayenne] 02/03: CAY-2698 EventSubject.getSubject() is not thread safe

2021-02-24 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

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

commit 8a5498880badf6f24b8e367291e8e424a76346d1
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:25:03 2021 +0300

CAY-2698 EventSubject.getSubject() is not thread safe
---
 .../org/apache/cayenne/event/EventSubject.java | 34 ++
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java 
b/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
index 99c8b43..7cc0fdc 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/event/EventSubject.java
@@ -40,8 +40,7 @@ import org.apache.cayenne.util.WeakValueMap;
 public class EventSubject implements Serializable {
 
 // a Map that will allow the values to be GC'ed
-@SuppressWarnings("unchecked")
-private static Map _registeredSubjects = new 
WeakValueMap<>();
+private static final Map _registeredSubjects = new 
WeakValueMap<>();
 
 // Subject identifier in the form "com.foo.bar/SubjectName"
 private String _fullyQualifiedSubjectName;
@@ -64,10 +63,14 @@ public class EventSubject implements Serializable {
 }
 
 String fullSubjectName = subjectOwner.getName() + "/" + subjectName;
-EventSubject newSubject = _registeredSubjects.get(fullSubjectName);
-if (newSubject == null) {
-newSubject = new EventSubject(fullSubjectName);
-_registeredSubjects.put(newSubject.getSubjectName(), newSubject);
+
+EventSubject newSubject;
+synchronized (_registeredSubjects) {
+newSubject = _registeredSubjects.get(fullSubjectName);
+if(newSubject == null) {
+newSubject = new EventSubject(fullSubjectName);
+_registeredSubjects.put(fullSubjectName, newSubject);
+}
 }
 
 return newSubject;
@@ -92,8 +95,7 @@ public class EventSubject implements Serializable {
 @Override
 public boolean equals(Object obj) {
 if (obj instanceof EventSubject) {
-return _fullyQualifiedSubjectName.equals(((EventSubject) obj)
-.getSubjectName());
+return _fullyQualifiedSubjectName.equals(((EventSubject) 
obj).getSubjectName());
 }
 
 return false;
@@ -101,7 +103,9 @@ public class EventSubject implements Serializable {
 
 @Override
 public int hashCode() {
-return new HashCodeBuilder(17, 
3).append(_fullyQualifiedSubjectName).toHashCode();
+return new HashCodeBuilder(17, 3)
+.append(_fullyQualifiedSubjectName)
+.toHashCode();
 }
 
 public String getSubjectName() {
@@ -114,15 +118,7 @@ public class EventSubject implements Serializable {
  */
 @Override
 public String toString() {
-StringBuilder buf = new StringBuilder(64);
-
-buf.append("<");
-buf.append(this.getClass().getName());
-buf.append(" 0x");
-buf.append(Integer.toHexString(System.identityHashCode(this)));
-buf.append("> ");
-buf.append(_fullyQualifiedSubjectName);
-
-return buf.toString();
+return "<" + this.getClass().getName() + " 0x" + 
Integer.toHexString(System.identityHashCode(this)) + "> "
++ _fullyQualifiedSubjectName;
 }
 }



[cayenne] branch STABLE-4.1 updated (a22851b -> e422087)

2021-02-24 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

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


from a22851b  CAY-2690 dbimport skips length changes for BINARY and 
VARBINARY columns
 new 3ad81a8  CAY-2677 Custom Class Generation Templates for Embeddables 
and DataMaps applying patch from Stefan S, see JIRA issue
 new 8a54988  CAY-2698 EventSubject.getSubject() is not thread safe
 new e422087  CAY-2698 and CAY-2677 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  |  3 +
 .../org/apache/cayenne/gen/CgenConfiguration.java  |  6 ++
 .../apache/cayenne/gen/xml/CgenConfigHandler.java  | 43 ++
 .../org/apache/cayenne/event/EventSubject.java | 34 
 .../cayenne/modeler/CodeTemplateManager.java   | 92 +
 .../modeler/editor/cgen/CustomModeController.java  | 75 +
 .../modeler/editor/cgen/CustomModePanel.java   | 93 +-
 7 files changed, 292 insertions(+), 54 deletions(-)



[cayenne] 03/03: CAY-2698 and CAY-2677 release notes

2021-02-24 Thread ntimofeev
This is an automated email from the ASF dual-hosted git repository.

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

commit e422087ee88998b38bebdc039965c638d39ead88
Author: Nikita Timofeev 
AuthorDate: Wed Feb 24 13:26:12 2021 +0300

CAY-2698 and CAY-2677 release notes
---
 RELEASE-NOTES.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 1f4fe0a..72b718c 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -16,9 +16,12 @@ Bug Fixes:
 
 CAY-2670 CommitLog does not include FKs for deleted objects with one-way 
relationships
 CAY-2676 Degradation: Custom class generation templates are not working anymore
+CAY-2677 Modeler: Custom Class Generation Templates for Embeddables and 
DataMaps
 CAY-2679 Unstable ordering of relationships in the .map.xml file
 CAY-2681 Modeler: All selected checkboxes cause project to become dirty at 
initialization
 CAY-2690 dbimport skips length changes for BINARY and VARBINARY columns
+CAY-2698 EventSubject.getSubject() is not thread safe
+
 --
 Release: 4.1
 Date: July 14, 2020



[jira] [Updated] (CAY-2630) Prefetched relationships not preserving pending changes

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2630:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Prefetched relationships not preserving pending changes
> ---
>
> Key: CAY-2630
> URL: https://issues.apache.org/jira/browse/CAY-2630
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.2.B1
>
>
> See [this PR|https://github.com/apache/cayenne/pull/390]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2629) Permanent ID is not propagated from parent to child context on commit

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2629:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Permanent ID is not propagated from parent to child context on commit
> -
>
> Key: CAY-2629
> URL: https://issues.apache.org/jira/browse/CAY-2629
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.2.B1
>
>
> Here is a failing test case from [this 
> PR|https://github.com/apache/cayenne/pull/385/]:
> {code}
>  @Test
>  public void testTwoStageCommit() {
>   DataContext parent = createDataContext();
>   ObjectContext child = runtime.newContext(parent);
>   Painting painting = child.newObject(Painting.class);
>   painting.setPaintingTitle("222");
>   child.commitChangesToParent();
>   parent.commitChanges();
>   assertTrue(!painting.getObjectId().isTemporary());
>  }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2637) Allow forcing a custom Connection for a transaction

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2637:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Allow forcing a custom Connection for a transaction
> ---
>
> Key: CAY-2637
> URL: https://issues.apache.org/jira/browse/CAY-2637
> Project: Cayenne
>  Issue Type: Task
>Reporter: Andrus Adamchik
>Priority: Major
> Fix For: 4.2.B1
>
>
> Just identified a use case where Cayenne transaction management API falls 
> short. 
> [DFLib|https://github.com/nhl/dflib] JDBCConnector allows manual transaction 
> management. I am using Cayenne with DFLib for a multi-step data 
> transformation process, with multiple commits within a transaction. Cayenne 
> queries should be able to include intermediate results flushed to DB (but 
> still not committed), so they need to run over the same Connection. 
> I was able to implement a custom solution that required wrapping both 
> DataSource and Transaction in custom classes. I think we can simplify this 
> for the end users. Some ideas:
> * add the ability to pass an explicit DataSource (and/or Connection) to 
> TransactionDescriptor. Expand ServerRuntime.performInTransaction(..) to take 
> TransactionDescriptor (just like TransactionManager does).
> * allow TransactionListener to provide its own connection, both in 
> "willAddConnection" (so it can wrap passed connection), or in a separate new 
> method that would allow to provide own Connection before Cayenne checks out 
> one from its own DataSource.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2607) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2607:
-
Labels: Oracle  (was: )

> java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
> 
>
> Key: CAY-2607
> URL: https://issues.apache.org/jira/browse/CAY-2607
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1.B2
>Reporter: MAX JEISON PRASS
>Assignee: Nikita Timofeev
>Priority: Major
>  Labels: Oracle
> Fix For: 4.2.B1
>
> Attachments: cayenne - error Cast Int to Long.PNG
>
>
> I have a PK property in table of oracle database, type NUMERIC(19).
> Modeler generate correct the type this property to Long, but a runtime 
> Exception when cast Objet to Long.
> I dont know when this error occurs, because any times this error dont occurs.
>  
> The Log Error is:
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.LongCaused by: java.lang.ClassCastException: java.lang.Integer 
> cannot be cast to java.lang.Long at 
> br.com.getnet.portais.minhaconta.atendimento.domain.minhaconta.model.auto._CodigoVerificacaoEntity.writePropertyDirectly(_CodigoVerificacaoEntity.java:128)
>  at 
> org.apache.cayenne.reflect.generic.DataObjectBaseProperty.writePropertyDirectly(DataObjectBaseProperty.java:84)
>  at 
> org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:178)
>  at 
> org.apache.cayenne.access.DataDomainInsertBucket.postprocess(DataDomainInsertBucket.java:214)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:248)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:155)
>  at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:624) at 
> org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:594) at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:822)
>  at 
> org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0(TransactionFilter.java:61)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(DefaultTransactionManager.java:183)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(DefaultTransactionManager.java:155)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(DefaultTransactionManager.java:98)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:65)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:43)
>  at org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:61) 
> at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:821)
>  at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:581) at 
> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742) ... 
> 53 more



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2607) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2607:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
> 
>
> Key: CAY-2607
> URL: https://issues.apache.org/jira/browse/CAY-2607
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1.B2
>Reporter: MAX JEISON PRASS
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.2.B1
>
> Attachments: cayenne - error Cast Int to Long.PNG
>
>
> I have a PK property in table of oracle database, type NUMERIC(19).
> Modeler generate correct the type this property to Long, but a runtime 
> Exception when cast Objet to Long.
> I dont know when this error occurs, because any times this error dont occurs.
>  
> The Log Error is:
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.LongCaused by: java.lang.ClassCastException: java.lang.Integer 
> cannot be cast to java.lang.Long at 
> br.com.getnet.portais.minhaconta.atendimento.domain.minhaconta.model.auto._CodigoVerificacaoEntity.writePropertyDirectly(_CodigoVerificacaoEntity.java:128)
>  at 
> org.apache.cayenne.reflect.generic.DataObjectBaseProperty.writePropertyDirectly(DataObjectBaseProperty.java:84)
>  at 
> org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:178)
>  at 
> org.apache.cayenne.access.DataDomainInsertBucket.postprocess(DataDomainInsertBucket.java:214)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:248)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:155)
>  at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:624) at 
> org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:594) at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:822)
>  at 
> org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0(TransactionFilter.java:61)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(DefaultTransactionManager.java:183)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(DefaultTransactionManager.java:155)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(DefaultTransactionManager.java:98)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:65)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:43)
>  at org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:61) 
> at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:821)
>  at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:581) at 
> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742) ... 
> 53 more



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2697) Read-only cgen template creates mutator methods for to-many relationships

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2697:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Read-only cgen template creates mutator methods for to-many relationships
> -
>
> Key: CAY-2697
> URL: https://issues.apache.org/jira/browse/CAY-2697
> Project: Cayenne
>  Issue Type: Bug
>Affects Versions: 4.2.M2
> Environment: I have CayenneModeler v. 4.2.M3-SNAPSHOT (built around 
> 11/2020)
>Reporter: Andrus Adamchik
>Priority: Minor
> Fix For: 4.2.B1
>
>
> I have a model with read-only entities. Class generation from CayenneModeler 
> correctly excludes all setters, but incorrectly generates "addToX" and 
> "removeFromX" to-many mutators.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2607) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2607:
-
Priority: Major  (was: Critical)

> java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
> 
>
> Key: CAY-2607
> URL: https://issues.apache.org/jira/browse/CAY-2607
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1.B2
>Reporter: MAX JEISON PRASS
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.2.M3
>
> Attachments: cayenne - error Cast Int to Long.PNG
>
>
> I have a PK property in table of oracle database, type NUMERIC(19).
> Modeler generate correct the type this property to Long, but a runtime 
> Exception when cast Objet to Long.
> I dont know when this error occurs, because any times this error dont occurs.
>  
> The Log Error is:
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.LongCaused by: java.lang.ClassCastException: java.lang.Integer 
> cannot be cast to java.lang.Long at 
> br.com.getnet.portais.minhaconta.atendimento.domain.minhaconta.model.auto._CodigoVerificacaoEntity.writePropertyDirectly(_CodigoVerificacaoEntity.java:128)
>  at 
> org.apache.cayenne.reflect.generic.DataObjectBaseProperty.writePropertyDirectly(DataObjectBaseProperty.java:84)
>  at 
> org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:178)
>  at 
> org.apache.cayenne.access.DataDomainInsertBucket.postprocess(DataDomainInsertBucket.java:214)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:248)
>  at 
> org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:155)
>  at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:624) at 
> org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:594) at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:822)
>  at 
> org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0(TransactionFilter.java:61)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(DefaultTransactionManager.java:183)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(DefaultTransactionManager.java:155)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(DefaultTransactionManager.java:98)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:65)
>  at 
> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:43)
>  at org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:61) 
> at 
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:821)
>  at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:581) at 
> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742) ... 
> 53 more



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2614) Connection test result window shown under other windows.

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2614:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Connection test result window shown under other windows.
> 
>
> Key: CAY-2614
> URL: https://issues.apache.org/jira/browse/CAY-2614
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1.B2
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.2.B1
>
> Attachments: Screen Shot 2019-09-05 at 14.51.48.png
>
>
> See screenshot



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2626) DbImport: Allow empty value for table types field

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2626:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> DbImport: Allow empty value for table types field
> -
>
> Key: CAY-2626
> URL: https://issues.apache.org/jira/browse/CAY-2626
> Project: Cayenne
>  Issue Type: Improvement
>  Components: dbimport, Modeler
>Reporter: Nikita Timofeev
>Priority: Minor
> Fix For: 4.2.B1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> [see this 
> comment|https://issues.apache.org/jira/browse/CAY-2593?focusedCommentId=1686=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1686]
>  of CAY-2593



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2548) Need to use fully qualified table name in Auto PK generator

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2548:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Need to use fully qualified table name in Auto PK generator
> ---
>
> Key: CAY-2548
> URL: https://issues.apache.org/jira/browse/CAY-2548
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library
>Affects Versions: 4.2.M1
>Reporter: Arseni Bulatski
>Priority: Major
> Fix For: 4.2.B1
>
>
> Need to use fully qualified table name in Auto PK generator.
> Need to use catalog and schema names when create, update or delete 
> AUTO_PK_SUPPORT table.
> Note:
> Look JdbcPkGenerator class.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2241) cdbimport: set ObjRelationship delete rule from FK metadata (if it's possible)

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2241:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> cdbimport: set ObjRelationship delete rule from FK metadata (if it's possible)
> --
>
> Key: CAY-2241
> URL: https://issues.apache.org/jira/browse/CAY-2241
> Project: Cayenne
>  Issue Type: Improvement
>  Components: dbimport, Modeler, Non-GUI Tools
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.3.M1
>
>
> DbRelationship doesn't know anything about delete rule and just set it to 
> ObjRelationship's default ("Deny") in case of new relationship is detected in 
> cdbimport.
> If we can set this value based on DB metadata this can save someone from 
> unnecessary troubles.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2684) Use EXISTS subquery for expressions using to-many related entities

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2684:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Use EXISTS subquery for expressions using to-many related entities
> --
>
> Key: CAY-2684
> URL: https://issues.apache.org/jira/browse/CAY-2684
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.3.M1
>
>
> Using EXISTS() subquery instead of the JOIN for expressions using paths on 
> to-many related entities could boost performance significant in some cases.
> As support for the subqueries already implemented per CAY-2468, this should 
> be relatively easy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2680) Text Fields in Modeler loose modification when switching to another tab or panel

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2680:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Text Fields in Modeler loose modification when switching to another tab or 
> panel
> 
>
> Key: CAY-2680
> URL: https://issues.apache.org/jira/browse/CAY-2680
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1
>Reporter: Stefan S.
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.1.1, 4.3.M1
>
> Attachments: cayenne_modeler_text_adapter_patch.diff
>
>
> Observation:
> Several (single line) text fields in Modeler forget changes or insertions of 
> text if the user switches to a different panel or tab without explicitly 
> leaving (bluring) the text field.
>  
> Expectation:
> Text changes shall be kept also in those cases.
>  
> Background:
> It hit me several times, when, e.g. walking through a list of entities to add 
> comments or modify other texts, that the changes are dismissed due to 
> switching to the next entity or a different 'area' of the application. To 
> keep the changes, it is necessary to click onto a different UI element within 
> the same panel. It seems that changes of single line texts are 'taken over' 
> only on 'focus lost' event, which are not fired in the described cases.
>  
> As a simple solution, I defaulted 'checkOnTyping' to 'true' in the standard 
> constructor of
> {code:java}
> org.apache.cayenne.modeler.util.TextAdapter
> {code}
> which is more a quick hack, since it might not cover all relevant instances 
> and introduces some potential processing overhead when typing. A better 
> approach would probably be to trigger the commit of changed texts in 
> listeners of appropriate events. Nevertheless no negative impact to 
> performance was observed using this approach.
> The attached patch provides this change AND the propagation of constructor 
> arguments, which have originally been dismissed and replaced by hardcode 
> values.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2672) [WIP] Modeler is always saying: [INFO] Detected changes: No changes to import.

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2672:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> [WIP] Modeler is always saying: [INFO] Detected changes: No changes to import.
> --
>
> Key: CAY-2672
> URL: https://issues.apache.org/jira/browse/CAY-2672
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1
>Reporter: Emerson Castaneda
>Priority: Minor
> Fix For: 4.1.1, 4.2.B1
>
>
> TBC
> https://cayenne.apache.org/docs/4.1/getting-started-db-first/#importing-database
> https://cayenne.apache.org/docs/4.1/getting-started-db-first/#reverse-engineering-database



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2639) DBImport and DB name case sensitivity

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2639:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> DBImport and DB name case sensitivity
> -
>
> Key: CAY-2639
> URL: https://issues.apache.org/jira/browse/CAY-2639
> Project: Cayenne
>  Issue Type: Improvement
>Affects Versions: 4.1.RC2
> Environment: MySQL 5.7
>Reporter: Andrus Adamchik
>Priority: Minor
> Fix For: 4.2.B1
>
>
> I just ran into a minor issue with DB import Modeler process. 
> Given: A table with lowercase table name and uppercase column names 
> 1. DB Import the table to Cayenne. Import preserves correct capitalization. 
> 2. Due to a change in project naming conventions, column name capitalization 
> was changed to lowercase.
> 3. Rerun DB import.. Result: no changes were reported, and I had to adjust 
> the model by hand.
> So DB Import is CS for new names, but is CI when checking for changes. 
> The topic of case sensitivity of DB names is not a simple one. There are lots 
> of variations and bad legacy. Perhaps here we need to explicitly detect the 
> case when a CI check matches a db object (a table or a column), but CS 
> reports a pair of events - object deletion and another object creation, and 
> present a dialog for the user to decide what to do. Possible options:
> 1. replace the original names (looks like the most reasonable option)
> 2. process as delete/create (the effect is _almost_ the same as #1? except 
> some of the obj customizations and possibly relationships may get lost ... is 
> this a useful option?)
> 3. Do nothing, effectively preserving the original capitalization (this is 
> the current behavior. Do we care to preserve it?)
> Also need to analyze how DB import behaves when multiple tables/columns are 
> present that only differ in capitalization (i.e. when it is not a renaming)
> In any event, this issues has a minor impact, as people usually don't 
> randomly change name capitalization. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2636) Modeler: Ordering in db import config

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2636:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Modeler: Ordering in db import config
> -
>
> Key: CAY-2636
> URL: https://issues.apache.org/jira/browse/CAY-2636
> Project: Cayenne
>  Issue Type: Improvement
>  Components: dbimport, Modeler
>Affects Versions: 4.1.RC1
>Reporter: Nikita Timofeev
>Priority: Minor
> Fix For: 4.2.B1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a part of CAY-2634
>  
> * Ordering of includes / excludes - when I add an include to a catalog, it is 
> added at the end of the list of includes / excludes. But when I come back to 
> view again, it is reordered to precede all excludes (which is correct, but I 
> guess it should be visually added where it belongs from the start).
> * There's no way to reorder entries within includes and excludes. Manual 
> reordering should be useful especially with regular expressions, where rules 
> may depend on previous rules.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2620) Images quality improvement

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2620:
-
Fix Version/s: (was: 4.2.M3)
   Undefined future

> Images quality improvement
> --
>
> Key: CAY-2620
> URL: https://issues.apache.org/jira/browse/CAY-2620
> Project: Cayenne
>  Issue Type: Task
>  Components: Modeler
>Reporter: Natallia
>Priority: Minor
> Fix For: Undefined future
>
> Attachments: 1.png, 2.png
>
>
> 4.1.B3-SNAPSHOT
> *Result*:
> 1) Windows 10:
> !1.png!
> 2) OS X:
> !2.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2536) No Catalog/Schema selection in Generate Database Schema

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2536:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> No Catalog/Schema selection in Generate Database Schema
> ---
>
> Key: CAY-2536
> URL: https://issues.apache.org/jira/browse/CAY-2536
> Project: Cayenne
>  Issue Type: Bug
>  Components: Modeler
>Affects Versions: 4.1.B1
>Reporter: ana benko
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.2.B1
>
>
> There's no catalog/schema selection in Generate Database Schema after 
> selecting db connection without catalog/schema in url
> -> no db is generated
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2556) Unused MergerToken is generated

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2556:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Unused MergerToken is generated
> ---
>
> Key: CAY-2556
> URL: https://issues.apache.org/jira/browse/CAY-2556
> Project: Cayenne
>  Issue Type: Bug
>  Components: dbimport
>Affects Versions: 4.1.B2, 4.2.M1
>Reporter: Arseni Bulatski
>Priority: Minor
> Fix For: 4.2.B1
>
>
> # Drop not null column from db
>  # Run dbImport
>  # This log appears:
> {code:java}
> [INFO] Drop Column team_daily_standings.LOSSES_LAST_10_GAMES
> [INFO] Drop Column team_daily_standings.WINS_LAST_10_GAMES
> [INFO] Drop Column team_daily_standings.TIES_LAST_10_GAMES
> [INFO] Drop Column team_daily_standings.OT_LOSSES_LAST_10_GAMES
> ...
> [INFO] Set Allow Null team_daily_standings.LOSSES_LAST_10_GAMES
> [INFO] Set Allow Null team_daily_standings.WINS_LAST_10_GAMES
> [INFO] Set Allow Null team_daily_standings.TIES_LAST_10_GAMES
> [INFO] Set Allow Null team_daily_standings.OT_LOSSES_LAST_10_GAMES
> {code}
> Token to allow null was created but will never used because this column was 
> dropped before.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2528) Subquery as query root

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2528:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Subquery as query root
> --
>
> Key: CAY-2528
> URL: https://issues.apache.org/jira/browse/CAY-2528
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.3.M1
>
>
> After implementing CAY-2526 this will be really useful.
> API example:
> {code}
> Select subselect = ObjectSelect.query(..)
> ObjectSelect.query(Artist.class)
> .join(subselect, "s", exp)
> .select(context);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2314) Problem in UnmanagedPoolingDataSource with managing closed Derby connection

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2314:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Problem in UnmanagedPoolingDataSource with managing closed Derby connection
> ---
>
> Key: CAY-2314
> URL: https://issues.apache.org/jira/browse/CAY-2314
> Project: Cayenne
>  Issue Type: Bug
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Minor
> Fix For: 4.3.M1
>
>
> There is random and rare test failures with a stack trace like this:
> {quote}
> org.apache.cayenne.CayenneRuntimeException: [v.4.0.M6-SNAPSHOT May 19 2017 
> 14:34:29] Global exception.
>   at org.apache.derby.iapi.error.StandardException.newException(Unknown 
> Source)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>   at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
>   at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedConnection.getAutoCommit(Unknown 
> Source)
>   at 
> org.apache.cayenne.datasource.PoolAwareConnection.getAutoCommit(PoolAwareConnection.java:155)
>   at 
> org.apache.cayenne.datasource.UnmanagedPoolingDataSource.resetState(UnmanagedPoolingDataSource.java:309)
>   at 
> org.apache.cayenne.datasource.UnmanagedPoolingDataSource.getConnection(UnmanagedPoolingDataSource.java:334)
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2515) In-memory evaluation of user-defined SQL functions

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2515:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> In-memory evaluation of user-defined SQL functions
> --
>
> Key: CAY-2515
> URL: https://issues.apache.org/jira/browse/CAY-2515
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library
>Reporter: Nikita Timofeev
>Priority: Minor
> Fix For: 4.3.M1
>
>
> Cayenne allows to evaluate expressions in memory, however custom functions 
> allowed per CAY-2512 (as well as aggregate functions, but that's should be 
> dealt separately) just throw exceptions in that case.
>  Seems like not a high priority task, but there can be some cases when this 
> feature can be useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2516) Support for custom syntax for SQL function call

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2516:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Support for custom syntax for SQL function call
> ---
>
> Key: CAY-2516
> URL: https://issues.apache.org/jira/browse/CAY-2516
> Project: Cayenne
>  Issue Type: Task
>Reporter: Nikita Timofeev
>Priority: Minor
> Fix For: 4.3.M1
>
>
> This task is about an unimplemented case of CAY-2512 for calling SQL 
> functions with custom syntax, like {code}
> OVERLAY ( 'foo bar' PLACING 'baz' FROM 5 )
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2597) Case when implementation for Cayenne

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2597:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Case when implementation for Cayenne
> 
>
> Key: CAY-2597
> URL: https://issues.apache.org/jira/browse/CAY-2597
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Affects Versions: 4.1.B2
>Reporter: hilman
>Priority: Major
>  Labels: features
> Fix For: 4.3.M1
>
>
> this ORM is great i love it, but is there any expression for "case when" in 
> Cayenne? i am using version 4.1.B1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2560) Vertical Inheritance: optimistic lock on children is not implemented

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2560:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Vertical Inheritance: optimistic lock on children is not implemented
> 
>
> Key: CAY-2560
> URL: https://issues.apache.org/jira/browse/CAY-2560
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Affects Versions: 4.0.1, 4.1.B1
>Reporter: Nikita Timofeev
>Priority: Major
> Fix For: 4.3.M1
>
>
> Currently we can only use optimistic lock only on attributes of root entity 
> of vertical inheritance hierarchy. Marking as "use for optimistic lock" sub 
> entities' attributes does nothing.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2513) Memory leak because of many instances of InvocationDispatch

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2513:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Memory leak because of many instances of InvocationDispatch
> ---
>
> Key: CAY-2513
> URL: https://issues.apache.org/jira/browse/CAY-2513
> Project: Cayenne
>  Issue Type: Bug
>  Components: Core Library
>Affects Versions: 4.1.B1, 4.2.M1
>Reporter: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> Using shared cache and creating many contexts causes this problem.
> Each change sends snapshot event to all contexts what causes growth of 
> InvocationDispatch because all contexts are listeners to other contexts.
> The workaround is https://issues.apache.org/jira/browse/CAY-2514



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2554) Redesign dbRelationship's and join's structure

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2554:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Redesign dbRelationship's and join's structure
> --
>
> Key: CAY-2554
> URL: https://issues.apache.org/jira/browse/CAY-2554
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library
>Affects Versions: 4.2.M1
>Reporter: Arseni Bulatski
>Assignee: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> Need to redesign DbRelationship and DbJoin in order to represent relation 
> between entities.
> DbJoin will hold relationship's condition(usual join with pairs of attributes 
> or expression join)  and two dbRelationships, one at a time for each entities.
> This change will better represent relation from database view and will help 
> to implement some new features.
> Structure:
> DbJoin
>  * DbJoinCondition
>  * DbRelationship[]
> Condition for pairs of attributes:
> ColumnPairsCondition
>  * List
> or ExpressionCondition(in future)
>  * Expression
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2524) New EventManager implementation

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2524:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> New EventManager implementation
> ---
>
> Key: CAY-2524
> URL: https://issues.apache.org/jira/browse/CAY-2524
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.3.M1
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2526) Dynamic join at query time in ObjectSelect

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2526:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Dynamic join at query time in ObjectSelect
> --
>
> Key: CAY-2526
> URL: https://issues.apache.org/jira/browse/CAY-2526
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library, Database integration
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.3.M1
>
>
> For complex queries there is a need to join tables that are not directly 
> linked with root via relationship.
>  Currently this can be done only in raw SQL queries (like {{SQLTemplate}}).
> We can introduce support for that in {{ObjectSelect}}.
> API can look something like this (we probably need some improvements in 
> {{Property}} API as well):
> {code:java}
> StringProperty paintingTitle = 
> PropertyFactory.createString("p.paintingTitle", String.class);
> ObjectSelect
> .columnQuery(Artist.class, Artist.ARTIST_NAME, paintingTitle)
> .join(Painting.class, "p", 
> Artist.ARTIST_NAME.length().eq(paintingTitle.length()))
> .select(context);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2498) Rename packages to prevent crossing package names

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2498:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Rename packages to prevent crossing package names
> -
>
> Key: CAY-2498
> URL: https://issues.apache.org/jira/browse/CAY-2498
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library, ROP
>Reporter: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> Need to rename packages to prevent crossing package names when using java 
> modularity.
> Conflicts were found between:
> 1) cayenne-project-compatibility and cayenne-server
> 2) cayenne-rop-server and cayenne-server
> 3) cayenne-client and cayenne-client-jetty
> 4) cayenne-server and cayenne-dbcp2
> 5) cayenne-server and jgroups, jms, xmpp
> 6) cayenne-protostuff and cayenne-server



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2529) Custom expression in DbJoin

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2529:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Custom expression in DbJoin
> ---
>
> Key: CAY-2529
> URL: https://issues.apache.org/jira/browse/CAY-2529
> Project: Cayenne
>  Issue Type: Task
>  Components: Core Library, Modeler
>Reporter: Nikita Timofeev
>Assignee: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Cayenne uses expression like {{src.id = dst.fk}} as a join clause and this is 
> hardcoded for now.
> We can extend this to accept any {{Expression}}.
> This will require redesign in Modeler DbJoin creation dialog and some changes 
> in SelectTranslator. Also this may touch some logic that depends on 
> {{DbRelationship.isSourceIndependentFromTargetChange()}} method.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2488) Problem with not to PK relationships

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2488:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Problem with not to PK relationships
> 
>
> Key: CAY-2488
> URL: https://issues.apache.org/jira/browse/CAY-2488
> Project: Cayenne
>  Issue Type: Bug
>  Components: Core Library
>Reporter: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> Problem with not to PK relationships was found.
>  * create relationship with join not to PK (target or source attribute isn't 
> PK) in modeler
>  * create entities
>  * create relationship between entities
>  * commit changes
> In database objects will be created, but relationship won't be created. So 
> you can't be able to get joined objects.
> This happens because in you can't create arcDiff.
> Look DataDomainDBDiffBuilder arcCreated method and appendForeignKeys method.
> In current logic you can get only PK attribute value from ObjectId.
> First step is to add validation of this case to prevent creation of this 
> relationship.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2552) ColumnQuery with flattened attributes bug

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2552:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> ColumnQuery with flattened attributes bug
> -
>
> Key: CAY-2552
> URL: https://issues.apache.org/jira/browse/CAY-2552
> Project: Cayenne
>  Issue Type: Bug
>  Components: Core Library
>Affects Versions: 4.2.M1
>Reporter: Arseni Bulatski
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.3.M1
>
> Attachments: ColumnQuery_with_flattened_attribute_bug.patch
>
>
> Select entity with flattened attributes in column query.
> Entry point: EntityRowReader
> Fields size from segmentMetadata isn't equal to columns list size in 
> RowDescriptor.
> You can see test case in attachment.
>  
> This bugs appeared when worked on CAY-2529 Custom expression in DbJoin. Order 
> of attributes was changed and bug with wrong size broke tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2483) Method to return Object[] with entity after SQLTemplate or SQLSelect perform

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2483:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Method to return Object[] with entity after SQLTemplate or SQLSelect perform
> 
>
> Key: CAY-2483
> URL: https://issues.apache.org/jira/browse/CAY-2483
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Reporter: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> Add methods to return Object[] with entity after SQLTemplate or SQLSelect 
> perform.
> Example :
> List result = SQLSelect.scalarQuery("SELECT #result(p, 'Painting'), 
> ARTIST.NAME FROM PAINTING AS p INNER JOIN ARTIST ON p.ARTIST_ID=ARTIST.ID", 
> Paintng.class, String.class)
>  .select(context);
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2399) Convert string values to Enum in qualifiers

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2399:
-
Fix Version/s: (was: 4.2.M3)
   4.2.B1

> Convert string values to Enum in qualifiers
> ---
>
> Key: CAY-2399
> URL: https://issues.apache.org/jira/browse/CAY-2399
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Core Library
>Reporter: Nikita Timofeev
>Priority: Major
> Fix For: 4.2.B1
>
>
> See also CAY-2397
> For now you can only use Enum values as this: {{attribute = 
> enum:org.example.Enum.value}}
> This task is about allowing automatic conversion of String values to Enum in 
> expression like {{attribute = 'value'}}, where {{attribute}} is of {{Enum}} 
> type.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2477) Modeler: transfer modeler core on Bootique platform

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2477:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Modeler: transfer modeler core on Bootique platform
> ---
>
> Key: CAY-2477
> URL: https://issues.apache.org/jira/browse/CAY-2477
> Project: Cayenne
>  Issue Type: Improvement
>  Components: Modeler
>Reporter: Nikita Timofeev
>Assignee: Arseni Bulatski
>Priority: Major
> Fix For: 4.3.M1
>
>
> We have some internal experimental version for that and it is really 
> promising. Cayenne internal DI is great for Cayenne runtime, as it is fast 
> and have small footprint. However for big app such as Modeler Bootique 
> framework is much more flexible and extensible.
> This task completion will allow us:
>  # Split Modeler using bootique built-in modular architecture. This allows 
> better maintainability. Additionally we can introduce at some point plugin 
> architecture.
>  # Create base for experiments with JavaFX UI. This includes extracting some 
> UI-independent core and UI layer. This UI layer can be potentially replaced 
> with fully-functional JavaFX version without affecting core.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CAY-2378) Switch usage of SelectQuery to ObjectSelect internally

2021-02-24 Thread Nikita Timofeev (Jira)


 [ 
https://issues.apache.org/jira/browse/CAY-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Timofeev updated CAY-2378:
-
Fix Version/s: (was: 4.2.M3)
   4.3.M1

> Switch usage of SelectQuery to ObjectSelect internally
> --
>
> Key: CAY-2378
> URL: https://issues.apache.org/jira/browse/CAY-2378
> Project: Cayenne
>  Issue Type: Task
>Reporter: Nikita Timofeev
>Assignee: Nikita Timofeev
>Priority: Major
> Fix For: 4.3.M1
>
>
> Recommended select query since 4.0 is {{ObjectSelect}}, that is converted 
> internally to {{SelectQuery}}.
> We can gain some performance and maintainability by inverting this, i.e. 
> using {{ObjectSelect}} directly in Cayenne stack and converting 
> {{SelectQuery}} to it.
> Important note: this should not affect any public API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)