This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch STABLE-4.2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.2 by this push:
new f6cb7c930 CAY-2783 DbEntity to ObjEntity synchronization should check
mandatory flag for primitive java types
f6cb7c930 is described below
commit f6cb7c930e9aa0a3126edb654cca8734e1394c4a
Author: Nikita Timofeev <[email protected]>
AuthorDate: Tue Dec 6 11:44:33 2022 +0300
CAY-2783 DbEntity to ObjEntity synchronization should check mandatory flag
for primitive java types
---
.../tools/dbimport/testCustomObjectLayerSettings.map.xml-result | 4 ++--
.../apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql | 4 ++--
.../tools/dbimport/testExcludeRelationshipFirst.map.xml-result | 2 +-
.../org/apache/cayenne/tools/dbimport/testOneToOne.map.xml-result | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result
index 93116c9e3..8fc497dfe 100644
---
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result
+++
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result
@@ -23,11 +23,11 @@
project-version="10">
<property name="defaultSchema" value="SCHEMA_01"/>
<db-entity name="EXISTING_TABLE" schema="SCHEMA_01">
- <db-attribute name="COL2" type="INTEGER" length="10"/>
+ <db-attribute name="COL2" type="INTEGER" isMandatory="true"
length="10"/>
<db-attribute name="ID" type="INTEGER" isPrimaryKey="true"
isMandatory="true" length="10"/>
</db-entity>
<db-entity name="NEW_TABLE" schema="SCHEMA_01">
- <db-attribute name="COL2" type="INTEGER" length="10"/>
+ <db-attribute name="COL2" type="INTEGER" isMandatory="true"
length="10"/>
<db-attribute name="ID" type="INTEGER" isPrimaryKey="true"
isMandatory="true" length="10"/>
</db-entity>
<db-entity name="XYZ_PREFIXED_NEW_TABLE" schema="SCHEMA_01">
diff --git
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql
index 3506bcb75..e3b738d3a 100644
---
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql
+++
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql
@@ -20,13 +20,13 @@ SET SCHEMA schema_01;
CREATE TABLE schema_01.new_table (
id INTEGER NOT NULL,
- COL2 INTEGER,
+ COL2 INTEGER NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE schema_01.existing_table (
id INTEGER NOT NULL,
- COL2 INTEGER,
+ COL2 INTEGER NOT NULL,
PRIMARY KEY (id)
);
diff --git
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testExcludeRelationshipFirst.map.xml-result
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testExcludeRelationshipFirst.map.xml-result
index 51569b080..152c4b047 100644
---
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testExcludeRelationshipFirst.map.xml-result
+++
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testExcludeRelationshipFirst.map.xml-result
@@ -33,7 +33,7 @@
<obj-entity name="Test1" className="Test1" dbEntityName="TEST1"/>
<obj-entity name="Test2" className="Test2" dbEntityName="TEST2">
- <obj-attribute name="test1Id" type="int" db-attribute-path="TEST1_ID"/>
+ <obj-attribute name="test1Id" type="java.lang.Integer"
db-attribute-path="TEST1_ID"/>
</obj-entity>
diff --git
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne.map.xml-result
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne.map.xml-result
index 48551d440..54f3764a5 100644
---
a/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne.map.xml-result
+++
b/maven-plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne.map.xml-result
@@ -33,7 +33,7 @@
<db-attribute name="PLAYER_ID" type="INTEGER"
isPrimaryKey="true" isMandatory="true" length="10"/>
</db-entity>
<obj-entity name="PickSchedule" className="PickSchedule"
dbEntityName="PICK_SCHEDULE">
- <obj-attribute name="ownerId" type="int"
db-attribute-path="OWNER_ID"/>
+ <obj-attribute name="ownerId" type="java.lang.Integer"
db-attribute-path="OWNER_ID"/>
</obj-entity>
<obj-entity name="Player" className="Player" dbEntityName="PLAYER">
</obj-entity>