cayenne git commit: CAY-2032 SelectAction: DistinctResultIterator ignores flattened relationships
Repository: cayenne Updated Branches: refs/heads/master 062e85259 -> e3704c287 CAY-2032 SelectAction: DistinctResultIterator ignores flattened relationships Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e3704c28 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e3704c28 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e3704c28 Branch: refs/heads/master Commit: e3704c2878273d339cb3b792d085a65e1a639ec8 Parents: 062e852 Author: Nikita TimofeevAuthored: Fri Feb 3 17:23:25 2017 +0300 Committer: Nikita Timofeev Committed: Fri Feb 3 17:23:25 2017 +0300 -- .../access/jdbc/DistinctResultIterator.java | 28 ++--- .../cayenne/access/jdbc/SelectAction.java | 8 +- .../select/DefaultSelectTranslator.java | 10 +- .../access/translator/select/JoinStack.java | 8 +- .../translator/select/SelectTranslator.java | 6 + .../cayenne/dba/openbase/OpenBaseJoinStack.java | 6 +- .../dba/openbase/OpenBaseSelectTranslator.java | 2 +- .../cayenne/dba/oracle/Oracle8JoinStack.java| 6 +- .../dba/oracle/Oracle8SelectTranslator.java | 2 +- .../cayenne/query/PrefetchSelectQuery.java | 6 +- .../org/apache/cayenne/access/Cay2032IT.java| 115 +++ .../select/DefaultSelectTranslatorIT.java | 8 +- .../apache/cayenne/testdo/cay_2032/Team.java| 9 ++ .../apache/cayenne/testdo/cay_2032/User.java| 9 ++ .../cayenne/testdo/cay_2032/auto/_Team.java | 35 ++ .../cayenne/testdo/cay_2032/auto/_User.java | 43 +++ .../cayenne/unit/di/server/CayenneProjects.java | 1 + .../cayenne/unit/di/server/SchemaBuilder.java | 2 +- .../src/test/resources/cay-2032.map.xml | 37 ++ .../src/test/resources/cayenne-cay-2032.xml | 4 + docs/doc/src/main/resources/RELEASE-NOTES.txt | 1 + 21 files changed, 306 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cayenne/blob/e3704c28/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java -- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java index 4cc0bb6..850b117 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java @@ -45,7 +45,7 @@ public class DistinctResultIterator implements ResultIterator { protected ResultIterator delegate; protected Set
[jira] [Closed] (CAY-2032) SelectAction: DistinctResultIterator ignores flattened relationships
[ https://issues.apache.org/jira/browse/CAY-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev closed CAY-2032. Resolution: Fixed Fix Version/s: 4.0.M5 https://github.com/apache/cayenne/commit/e3704c2878273d339cb3b792d085a65e1a639ec8 > SelectAction: DistinctResultIterator ignores flattened relationships > > > Key: CAY-2032 > URL: https://issues.apache.org/jira/browse/CAY-2032 > Project: Cayenne > Issue Type: Bug > Components: Core Library >Affects Versions: 4.0.M3 > Environment: MySQL database > Cayenne 4.0.M3.debfa94 >Reporter: Denis Koyro >Assignee: Nikita Timofeev > Fix For: 4.0.M5 > > > Let's take a look at the example: > Cayenne model: Team and User entities, many-to-many relationship between > them. > Data: There are 3 teams and a user, who is linked to all these teams. > We're trying to fetch Teams and their related Users (via the prefetching) by > using any of disjoint semantics (perhaps it doesn't matter what semantic is > being used in this case). > Thus Cayenne engine performs 2 queries: > 1. To fetch Team records; > 2. To fetch User records: > SELECT t0.*, t2.id FROM user t0 > JOIN user_has_team t1 ON (t0.id = t1.user_id) > JOIN team t2 ON (t1.team_id = t2.id); > 3 records are resulted from the 2nd query execution. The records are differs > by "t2.id" column (it's a Team id), so they are not distinct. > And as a result DistinctResultIterator should take this fact into account > during processing the results. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Assigned] (CAY-2032) SelectAction: DistinctResultIterator ignores flattened relationships
[ https://issues.apache.org/jira/browse/CAY-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev reassigned CAY-2032: Assignee: Nikita Timofeev > SelectAction: DistinctResultIterator ignores flattened relationships > > > Key: CAY-2032 > URL: https://issues.apache.org/jira/browse/CAY-2032 > Project: Cayenne > Issue Type: Bug > Components: Core Library >Affects Versions: 4.0.M3 > Environment: MySQL database > Cayenne 4.0.M3.debfa94 >Reporter: Denis Koyro >Assignee: Nikita Timofeev > > Let's take a look at the example: > Cayenne model: Team and User entities, many-to-many relationship between > them. > Data: There are 3 teams and a user, who is linked to all these teams. > We're trying to fetch Teams and their related Users (via the prefetching) by > using any of disjoint semantics (perhaps it doesn't matter what semantic is > being used in this case). > Thus Cayenne engine performs 2 queries: > 1. To fetch Team records; > 2. To fetch User records: > SELECT t0.*, t2.id FROM user t0 > JOIN user_has_team t1 ON (t0.id = t1.user_id) > JOIN team t2 ON (t1.team_id = t2.id); > 3 records are resulted from the 2nd query execution. The records are differs > by "t2.id" column (it's a Team id), so they are not distinct. > And as a result DistinctResultIterator should take this fact into account > during processing the results. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
cayenne git commit: replace "maven-cayenne-plugin" with "cayenne-maven-plugin"
Repository: cayenne Updated Branches: refs/heads/master fa85eb60f -> 062e85259 replace "maven-cayenne-plugin" with "cayenne-maven-plugin" Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/062e8525 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/062e8525 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/062e8525 Branch: refs/heads/master Commit: 062e8525944d59ae165797c58c95a9925010c4f5 Parents: fa85eb6 Author: Nikita TimofeevAuthored: Fri Feb 3 13:36:06 2017 +0300 Committer: Nikita Timofeev Committed: Fri Feb 3 13:36:06 2017 +0300 -- build-tools/cayenne-coverage/pom.xml | 2 +- cayenne-crypto/pom.xml | 2 +- cayenne-java8/pom.xml| 2 +- cayenne-joda/pom.xml | 2 +- cayenne-protostuff/pom.xml | 2 +- itests/cayenne-tools-itest/pom.xml | 2 +- pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/build-tools/cayenne-coverage/pom.xml -- diff --git a/build-tools/cayenne-coverage/pom.xml b/build-tools/cayenne-coverage/pom.xml index aa09df8..6a4a51b 100644 --- a/build-tools/cayenne-coverage/pom.xml +++ b/build-tools/cayenne-coverage/pom.xml @@ -52,7 +52,7 @@ org.apache.cayenne.plugins -maven-cayenne-plugin +cayenne-maven-plugin ${cayenne.version} http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/cayenne-crypto/pom.xml -- diff --git a/cayenne-crypto/pom.xml b/cayenne-crypto/pom.xml index 74b60b9..6ed1b8c 100644 --- a/cayenne-crypto/pom.xml +++ b/cayenne-crypto/pom.xml @@ -88,7 +88,7 @@ org.apache.cayenne.plugins - maven-cayenne-plugin + cayenne-maven-plugin ${project.version} ${project.basedir}/src/test/resources/datamap.map.xml http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/cayenne-java8/pom.xml -- diff --git a/cayenne-java8/pom.xml b/cayenne-java8/pom.xml index ee70b55..598f21a 100644 --- a/cayenne-java8/pom.xml +++ b/cayenne-java8/pom.xml @@ -91,7 +91,7 @@ org.apache.cayenne.plugins - maven-cayenne-plugin + cayenne-maven-plugin ${project.version} ${project.basedir}/src/test/resources/java8.map.xml http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/cayenne-joda/pom.xml -- diff --git a/cayenne-joda/pom.xml b/cayenne-joda/pom.xml index 18354ff..77c40f9 100644 --- a/cayenne-joda/pom.xml +++ b/cayenne-joda/pom.xml @@ -113,7 +113,7 @@ org.apache.cayenne.plugins - maven-cayenne-plugin + cayenne-maven-plugin ${project.version} ${project.basedir}/src/test/resources/joda.map.xml http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/cayenne-protostuff/pom.xml -- diff --git a/cayenne-protostuff/pom.xml b/cayenne-protostuff/pom.xml index 185f446..510358f 100644 --- a/cayenne-protostuff/pom.xml +++ b/cayenne-protostuff/pom.xml @@ -110,7 +110,7 @@ org.apache.cayenne.plugins -maven-cayenne-plugin +cayenne-maven-plugin ${project.version} ${project.basedir}/src/test/resources/protostuff.map.xml http://git-wip-us.apache.org/repos/asf/cayenne/blob/062e8525/itests/cayenne-tools-itest/pom.xml -- diff --git a/itests/cayenne-tools-itest/pom.xml b/itests/cayenne-tools-itest/pom.xml index 6f2a75f..6f20fb9 100644 --- a/itests/cayenne-tools-itest/pom.xml +++ b/itests/cayenne-tools-itest/pom.xml @@ -67,7 +67,7 @@ org.apache.cayenne.plugins -
[jira] [Closed] (CAY-2212) cdbimport cleanup and configuration schema refactoring
[ https://issues.apache.org/jira/browse/CAY-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev closed CAY-2212. Resolution: Fixed > cdbimport cleanup and configuration schema refactoring > -- > > Key: CAY-2212 > URL: https://issues.apache.org/jira/browse/CAY-2212 > Project: Cayenne > Issue Type: Bug > Components: Non-GUI Tools >Reporter: Nikita Timofeev >Assignee: Nikita Timofeev > Fix For: 4.0.M5 > > > cdbimport Maven plugin (and Ant task) has many small problems with naming, > configuration schema and code organization. That leads to confusion when > configuring or maintaining it. > So several tasks should be done to improve usability of this tools. > Main braking change is the new XML schema for configuration: > {code:xml} > > maven-cayenne-plugin > > test.map.xml > org.apache.cayenne.dba.derby.DerbyAdapter > > > org.apache.derby.jdbc.EmbeddedDriver > jdbc:derby:memory:DbImporterMojoTest;create=true > cayenne > cayenne > > > > > > true > > false > true > false > > table1,table2,table3 > > TEST_CATALOG > > > table1 > .*XYZ > > table2 > table3 > > > TEST_SCHEMA > > > > > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Closed] (CAY-2218) Check common configuration parts of cdbimport and cdbgen
[ https://issues.apache.org/jira/browse/CAY-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev closed CAY-2218. Resolution: Fixed cdbgen connection properties moved to tag as in cdbimport https://github.com/apache/cayenne/commit/fa85eb60f6f6510bfc4d4f2bcd86192615a8a64b > Check common configuration parts of cdbimport and cdbgen > > > Key: CAY-2218 > URL: https://issues.apache.org/jira/browse/CAY-2218 > Project: Cayenne > Issue Type: Sub-task > Components: Non-GUI Tools >Reporter: Nikita Timofeev >Assignee: Nikita Timofeev > Fix For: 4.0.M5 > > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
cayenne git commit: CAY-2218 unify cdbimport and cdbgen parameters - move cdbgen connection properties to tag - update cdbgen documentation
Repository: cayenne Updated Branches: refs/heads/master ce3ea4291 -> fa85eb60f CAY-2218 unify cdbimport and cdbgen parameters - move cdbgen connection properties to tag - update cdbgen documentation Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/fa85eb60 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/fa85eb60 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/fa85eb60 Branch: refs/heads/master Commit: fa85eb60f6f6510bfc4d4f2bcd86192615a8a64b Parents: ce3ea42 Author: Nikita TimofeevAuthored: Fri Feb 3 13:22:44 2017 +0300 Committer: Nikita Timofeev Committed: Fri Feb 3 13:22:44 2017 +0300 -- .../src/docbkx/including-cayenne-in-project.xml | 98 ++-- .../apache/cayenne/tools/DbGeneratorMojo.java | 55 +-- .../apache/cayenne/tools/DbImporterMojo.java| 12 ++- 3 files changed, 103 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cayenne/blob/fa85eb60/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml -- diff --git a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml index d4c0942..5ecc16f 100644 --- a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml +++ b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml @@ -28,7 +28,7 @@ cayenne-client-.jar - a subset of cayenne-server.jar trimmed for use on -the client in an ROP application. +the client in an ROP application. Other cayenne-* jars - various Cayenne extensions. @@ -83,8 +83,8 @@ cgen required parameters - - + + Name @@ -105,9 +105,9 @@ cgen optional parameters - - - + + + Name @@ -258,8 +258,8 @@ cdbgen required parameters - - + + Name @@ -276,24 +276,64 @@ generation. E.g. ${project.basedir}/src/main/resources/my.map.xml - - driver - String - A class of JDBC driver to use for the target database. - - - url - String - JDBC connection URL of a target database. - + +dataSource + +XML +An object that contains Data Source parameters + - + + + + +dataSource> parameters + + + + + + +Name +Type +Required +Description + + + + +driver +String +Yes +
[jira] [Closed] (CAY-2217) cdbimport: update documentation and upgrade guide
[ https://issues.apache.org/jira/browse/CAY-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikita Timofeev closed CAY-2217. Resolution: Fixed https://github.com/apache/cayenne/commit/ce3ea42913daf9ead2c61da07b63183a48be6550 > cdbimport: update documentation and upgrade guide > - > > Key: CAY-2217 > URL: https://issues.apache.org/jira/browse/CAY-2217 > Project: Cayenne > Issue Type: Sub-task > Components: Documentation, Non-GUI Tools >Reporter: Nikita Timofeev >Assignee: Nikita Timofeev > Fix For: 4.0.M5 > > > Update documentation after all changes are done. > Doc: > - RELEASE-NOTES.txt > - UPGRADE.txt > Docbooks: > - cayenne guide > - upgrade guide -- This message was sent by Atlassian JIRA (v6.3.15#6346)
cayenne git commit: CAY-2217 cdbimport: update documentation and upgrade guide
Repository: cayenne Updated Branches: refs/heads/master 99f4f21c1 -> ce3ea4291 CAY-2217 cdbimport: update documentation and upgrade guide Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/ce3ea429 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/ce3ea429 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/ce3ea429 Branch: refs/heads/master Commit: ce3ea42913daf9ead2c61da07b63183a48be6550 Parents: 99f4f21 Author: Nikita TimofeevAuthored: Fri Feb 3 12:40:35 2017 +0300 Committer: Nikita Timofeev Committed: Fri Feb 3 12:40:35 2017 +0300 -- docs/doc/src/main/resources/RELEASE-NOTES.txt | 1 + docs/doc/src/main/resources/UPGRADE.txt | 26 +++ .../src/docbkx/including-cayenne-in-project.xml | 219 --- .../cayenne-guide/src/docbkx/re-filtering.xml | 36 +-- .../src/docbkx/re-introduction.xml | 20 +- .../cayenne-guide/src/docbkx/re-modeler.xml | 11 + .../src/docbkx/re-other-settings.xml| 16 +- .../re-modeler-reverseengineering-dialog.png| Bin 29936 -> 37668 bytes .../upgrade-guide/src/docbkx/new-features.xml | 29 +-- 9 files changed, 231 insertions(+), 127 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cayenne/blob/ce3ea429/docs/doc/src/main/resources/RELEASE-NOTES.txt -- diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt index 216ce7c..c165ab6 100644 --- a/docs/doc/src/main/resources/RELEASE-NOTES.txt +++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt @@ -27,6 +27,7 @@ CAY-2176 Java 7 diamond class generation templates CAY-2177 Sync auto generated state of PK between model and DB CAY-2187 Support for the scalar and aggregate SQL functions in ObjectSelect API CAY-2197 Update sqlite version and enable in-memory default config +CAY-2212 cdbimport cleanup and configuration schema refactoring Bug Fixes: http://git-wip-us.apache.org/repos/asf/cayenne/blob/ce3ea429/docs/doc/src/main/resources/UPGRADE.txt -- diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt index 627e4d2..7c27cf7 100644 --- a/docs/doc/src/main/resources/UPGRADE.txt +++ b/docs/doc/src/main/resources/UPGRADE.txt @@ -6,6 +6,32 @@ IMPORTANT: be sure to read all notes for the intermediate releases between your --- UPGRADING TO 4.0.M5 +* Per CAY-2212 cdbimport tool revisited once again, so configuration of Maven plugin should be changed. + - "maven-cayenne-plugin" is deprecated, please switch to "cayenne-maven-plugin" + - tag replaced with tag + - new tag introduced that should enclose all connection properties: +1. +2. +3. +4. + + - top level properties moved to : +1. +2. +3. +4. +5. +6. +7. + + - Java 8 java.time.* types are now used by default in cdbimport (and in "Reengineer Database Schema" tool in Modeler) + This can be controlled by property in (or checkbox in Modeler). + + - For Ant users: cayenne-tools.jar split into two parts: +1. cayenne-ant.jar for Ant tasks +2. cayenne-cgen.jar for class generation functionality (required only for cgen task) + + * Per CAY-2166, Cayenne supports auto-loading of DI modules. There are a few changes worth mentioning: - Service override policies. In the previous 4.0 milestones custom modules would override "builder" modules (i.e. implicit modules that wrap around various customizations made in response to the builder method calls). It http://git-wip-us.apache.org/repos/asf/cayenne/blob/ce3ea429/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml -- diff --git a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml index aba358b..d4c0942 100644 --- a/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml +++ b/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml @@ -66,10 +66,10 @@ Additionally Cayenne provides a Maven plugin with a set of goals to perform various project tasks, such as synching generated Java classes with the mapping, described in the following subsection. The full plugin name is - org.apache.cayenne.plugins:maven-cayenne-plugin. + org.apache.cayenne.plugins:cayenne-maven-plugin. cgen -cgen is a maven-cayenne-plugin goal