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 2019/03/07 10:53:57 UTC
[cayenne] 02/04: CAY-2521 Expression without Object ID disjoint
issue
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 fe0fd8b28b871b487edee2c71ea0185c8cc2c652
Author: Arseni Bulatski <an...@gmail.com>
AuthorDate: Mon Feb 11 16:48:05 2019 +0300
CAY-2521 Expression without Object ID disjoint issue
---
.../src/test/java/org/apache/cayenne/query/CAY_2521IT.java | 10 ++++++++--
cayenne-server/src/test/resources/cay-2521.map.xml | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/CAY_2521IT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/CAY_2521IT.java
index 9bab5e4..5735dca 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/CAY_2521IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/CAY_2521IT.java
@@ -67,15 +67,21 @@ public class CAY_2521IT extends ServerCase {
@After
public void after() throws SQLException {
+ this.tLocation.update().set("team_id", null, Types.INTEGER).execute();
+ this.tTeam.update().set("home_location_id", null, Types.INTEGER).execute();
+
this.tIssue.deleteAll();
- this.tTeam.deleteAll();
this.tLocation.deleteAll();
+ this.tTeam.deleteAll();
}
private void createDataSet() throws SQLException {
tLocation.insert(71, "Test", null);
- tTeam.insert(71, 8);
+ tTeam.insert(null, 8);
tIssue.insert(8, 100, 71);
+
+ tLocation.update().set("team_id", 8).execute();
+ tTeam.update().set("home_location_id", 71).execute();
}
@Test
diff --git a/cayenne-server/src/test/resources/cay-2521.map.xml b/cayenne-server/src/test/resources/cay-2521.map.xml
index 5cf7a82..a877131 100644
--- a/cayenne-server/src/test/resources/cay-2521.map.xml
+++ b/cayenne-server/src/test/resources/cay-2521.map.xml
@@ -6,11 +6,11 @@
<property name="defaultPackage" value="org.apache.cayenne.testdo.cay_2521"/>
<db-entity name="ISSUE">
<db-attribute name="home_team_id" type="INTEGER" length="10"/>
- <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true" length="10"/>
+ <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="location_id" type="INTEGER" length="10"/>
</db-entity>
<db-entity name="LOCATION">
- <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true" length="10"/>
+ <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="name" type="VARCHAR" length="45"/>
<db-attribute name="team_id" type="INTEGER" length="10"/>
</db-entity>