From f383466d8cf5d849ffed10006410d9a94635d7aa Mon Sep 17 00:00:00 2001 From: Martin Vergier Date: Thu, 11 Jun 2026 16:12:37 +0000 Subject: [PATCH 1/2] Fix KeyError when xs:choice branches share an element with same name and type In add_relation_1/add_relation_n, skip duplicate relations where a field with the same name and same XSD type already exists. Previously, self.fields (a list) accumulated both occurrences while self.relations_1/n (dicts) only kept the last, causing a KeyError in simplify_table when the first occurrence was elevated and the second tried to look it up. Add deliveryType to the orders crash-test schema to cover this case, with order3.xml exercising both the sequence branch (from+to) and standalone branch (to). Co-Authored-By: Claude Sonnet 4.6 --- src/xml2db/table/table.py | 10 +++++ tests/sample_models/orders/orders.xsd | 13 +++++++ .../orders/orders_ddl_mssql_version0.sql | 6 ++- .../orders/orders_ddl_mssql_version1.sql | 6 ++- .../orders/orders_ddl_mssql_version2.sql | 6 ++- .../orders/orders_ddl_mysql_version0.sql | 6 ++- .../orders/orders_ddl_mysql_version1.sql | 6 ++- .../orders/orders_ddl_mysql_version2.sql | 6 ++- .../orders/orders_ddl_postgresql_version0.sql | 6 ++- .../orders/orders_ddl_postgresql_version1.sql | 6 ++- .../orders/orders_ddl_postgresql_version2.sql | 6 ++- .../orders/orders_erd_version0.md | 2 + .../orders/orders_erd_version1.md | 2 + .../orders/orders_erd_version2.md | 2 + .../orders/orders_source_tree_version0.txt | 39 ++++++++++++++++++- .../orders/orders_source_tree_version1.txt | 39 ++++++++++++++++++- .../orders/orders_source_tree_version2.txt | 39 ++++++++++++++++++- .../orders/orders_target_tree_version0.txt | 30 +++++++++++++- .../orders/orders_target_tree_version1.txt | 32 ++++++++++++++- .../orders/orders_target_tree_version2.txt | 30 +++++++++++++- tests/sample_models/orders/xml/order3.xml | 25 ++++++++++++ 21 files changed, 302 insertions(+), 15 deletions(-) diff --git a/src/xml2db/table/table.py b/src/xml2db/table/table.py index 501c79d..f2a1972 100644 --- a/src/xml2db/table/table.py +++ b/src/xml2db/table/table.py @@ -180,6 +180,11 @@ def add_relation_1( raise ValueError( "attempting to add a 1-1 relationship with max occurrences different from 1" ) + if ( + name in self.relations_1 + and self.relations_1[name].other_table.type_name == other_table.type_name + ): + return rel = DataModelRelation1( name, [(name, other_table.type_name)], @@ -206,6 +211,11 @@ def add_relation_n(self, name, other_table, occurs, ngroup): raise ValueError( "attempting to add a 1-n relationship with max occurrences equal to 1" ) + if ( + name in self.relations_n + and self.relations_n[name].other_table.type_name == other_table.type_name + ): + return rel = DataModelRelationN( name, [(name, other_table.type_name)], diff --git a/tests/sample_models/orders/orders.xsd b/tests/sample_models/orders/orders.xsd index 0752850..151fc76 100644 --- a/tests/sample_models/orders/orders.xsd +++ b/tests/sample_models/orders/orders.xsd @@ -71,6 +71,18 @@ + + + + + + + + + + + @@ -78,6 +90,7 @@ + diff --git a/tests/sample_models/orders/orders_ddl_mssql_version0.sql b/tests/sample_models/orders/orders_ddl_mssql_version0.sql index b8f088a..a4c4121 100644 --- a/tests/sample_models/orders/orders_ddl_mssql_version0.sql +++ b/tests/sample_models/orders/orders_ddl_mssql_version0.sql @@ -48,9 +48,13 @@ CREATE TABLE item ( quantity INTEGER NULL, price DOUBLE PRECISION NULL, currency CHAR(3) NULL, + delivery_from_fk_orderperson INTEGER NULL, + delivery_to_fk_orderperson INTEGER NULL, record_hash BINARY(20) NULL, CONSTRAINT cx_pk_item PRIMARY KEY CLUSTERED (pk_item), - CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash) + CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_mssql_version1.sql b/tests/sample_models/orders/orders_ddl_mssql_version1.sql index d65bc44..7ec3ed2 100644 --- a/tests/sample_models/orders/orders_ddl_mssql_version1.sql +++ b/tests/sample_models/orders/orders_ddl_mssql_version1.sql @@ -87,8 +87,12 @@ CREATE TABLE item ( quantity INTEGER NULL, price DOUBLE PRECISION NULL, currency CHAR(3) NULL, + delivery_from_fk_orderperson INTEGER NULL, + delivery_to_fk_orderperson INTEGER NULL, CONSTRAINT cx_pk_item PRIMARY KEY CLUSTERED (pk_item), - FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder) + FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_mssql_version2.sql b/tests/sample_models/orders/orders_ddl_mssql_version2.sql index 15c7406..f06326a 100644 --- a/tests/sample_models/orders/orders_ddl_mssql_version2.sql +++ b/tests/sample_models/orders/orders_ddl_mssql_version2.sql @@ -84,10 +84,14 @@ CREATE TABLE item ( quantity INTEGER NULL, price DOUBLE PRECISION NULL, currency CHAR(3) NULL, + delivery_from_fk_orderperson INTEGER NULL, + delivery_to_fk_orderperson INTEGER NULL, xml2db_record_hash BINARY(20) NULL, CONSTRAINT cx_pk_item PRIMARY KEY CLUSTERED (pk_item), CONSTRAINT item_xml2db_record_hash UNIQUE (xml2db_record_hash), - FOREIGN KEY(fk_product) REFERENCES product (pk_product) + FOREIGN KEY(fk_product) REFERENCES product (pk_product), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_mysql_version0.sql b/tests/sample_models/orders/orders_ddl_mysql_version0.sql index c4a3eb5..7b7b79f 100644 --- a/tests/sample_models/orders/orders_ddl_mysql_version0.sql +++ b/tests/sample_models/orders/orders_ddl_mysql_version0.sql @@ -48,9 +48,13 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, record_hash BINARY(20), CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), - CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash) + CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_mysql_version1.sql b/tests/sample_models/orders/orders_ddl_mysql_version1.sql index 8a2139f..07865a6 100644 --- a/tests/sample_models/orders/orders_ddl_mysql_version1.sql +++ b/tests/sample_models/orders/orders_ddl_mysql_version1.sql @@ -87,8 +87,12 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), - FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder) + FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_mysql_version2.sql b/tests/sample_models/orders/orders_ddl_mysql_version2.sql index a556153..e8d17d9 100644 --- a/tests/sample_models/orders/orders_ddl_mysql_version2.sql +++ b/tests/sample_models/orders/orders_ddl_mysql_version2.sql @@ -84,10 +84,14 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, xml2db_record_hash BINARY(20), CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), CONSTRAINT item_xml2db_record_hash UNIQUE (xml2db_record_hash), - FOREIGN KEY(fk_product) REFERENCES product (pk_product) + FOREIGN KEY(fk_product) REFERENCES product (pk_product), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_postgresql_version0.sql b/tests/sample_models/orders/orders_ddl_postgresql_version0.sql index 9c2c92a..ee1c43d 100644 --- a/tests/sample_models/orders/orders_ddl_postgresql_version0.sql +++ b/tests/sample_models/orders/orders_ddl_postgresql_version0.sql @@ -48,9 +48,13 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE PRECISION, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, record_hash BYTEA, CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), - CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash) + CONSTRAINT item_xml2db_record_hash UNIQUE (record_hash), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_postgresql_version1.sql b/tests/sample_models/orders/orders_ddl_postgresql_version1.sql index 0abbb86..f7f8fc2 100644 --- a/tests/sample_models/orders/orders_ddl_postgresql_version1.sql +++ b/tests/sample_models/orders/orders_ddl_postgresql_version1.sql @@ -87,8 +87,12 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE PRECISION, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), - FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder) + FOREIGN KEY(fk_parent_shiporder) REFERENCES shiporder (pk_shiporder), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_ddl_postgresql_version2.sql b/tests/sample_models/orders/orders_ddl_postgresql_version2.sql index 03591a5..4ad1cd1 100644 --- a/tests/sample_models/orders/orders_ddl_postgresql_version2.sql +++ b/tests/sample_models/orders/orders_ddl_postgresql_version2.sql @@ -84,10 +84,14 @@ CREATE TABLE item ( quantity INTEGER, price DOUBLE PRECISION, currency VARCHAR(3), + delivery_from_fk_orderperson INTEGER, + delivery_to_fk_orderperson INTEGER, xml2db_record_hash BYTEA, CONSTRAINT cx_pk_item PRIMARY KEY (pk_item), CONSTRAINT item_xml2db_record_hash UNIQUE (xml2db_record_hash), - FOREIGN KEY(fk_product) REFERENCES product (pk_product) + FOREIGN KEY(fk_product) REFERENCES product (pk_product), + FOREIGN KEY(delivery_from_fk_orderperson) REFERENCES orderperson (pk_orderperson), + FOREIGN KEY(delivery_to_fk_orderperson) REFERENCES orderperson (pk_orderperson) ) diff --git a/tests/sample_models/orders/orders_erd_version0.md b/tests/sample_models/orders/orders_erd_version0.md index 6c9d33d..c3c803b 100644 --- a/tests/sample_models/orders/orders_erd_version0.md +++ b/tests/sample_models/orders/orders_erd_version0.md @@ -12,6 +12,8 @@ erDiagram string orderid dateTime processed_at } + item ||--o| orderperson : "delivery_from" + item ||--o| orderperson : "delivery_to" item ||--o{ intfeature_with_peculiarly_long_suffix_which_overflow_max_length : "product_features_intfeature_with_peculiarly_long_suffix_which_overflow_max_length*" item ||--o{ stringfeature : "product_features_stringfeature*" item { diff --git a/tests/sample_models/orders/orders_erd_version1.md b/tests/sample_models/orders/orders_erd_version1.md index b2eb1ff..2b44020 100644 --- a/tests/sample_models/orders/orders_erd_version1.md +++ b/tests/sample_models/orders/orders_erd_version1.md @@ -1,5 +1,7 @@ ```mermaid erDiagram + item ||--o| orderperson : "delivery_from" + item ||--o| orderperson : "delivery_to" item ||--o{ intfeature_with_peculiarly_long_suffix_which_overflow_max_length : "product_features_intfeature_with_peculiarly_long_suffix_which_overflow_max_length*" item ||--o{ stringfeature : "product_features_stringfeature*" item { diff --git a/tests/sample_models/orders/orders_erd_version2.md b/tests/sample_models/orders/orders_erd_version2.md index c453517..fba046e 100644 --- a/tests/sample_models/orders/orders_erd_version2.md +++ b/tests/sample_models/orders/orders_erd_version2.md @@ -20,6 +20,8 @@ erDiagram string orderperson_a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length } item ||--|| product : "product" + item ||--o| orderperson : "delivery_from" + item ||--o| orderperson : "delivery_to" item { string note integer quantity diff --git a/tests/sample_models/orders/orders_source_tree_version0.txt b/tests/sample_models/orders/orders_source_tree_version0.txt index 870012b..aaead3a 100644 --- a/tests/sample_models/orders/orders_source_tree_version0.txt +++ b/tests/sample_models/orders/orders_source_tree_version0.txt @@ -54,4 +54,41 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery[0, 1] (choice): + from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version1.txt b/tests/sample_models/orders/orders_source_tree_version1.txt index 870012b..aaead3a 100644 --- a/tests/sample_models/orders/orders_source_tree_version1.txt +++ b/tests/sample_models/orders/orders_source_tree_version1.txt @@ -54,4 +54,41 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery[0, 1] (choice): + from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_source_tree_version2.txt b/tests/sample_models/orders/orders_source_tree_version2.txt index 870012b..aaead3a 100644 --- a/tests/sample_models/orders/orders_source_tree_version2.txt +++ b/tests/sample_models/orders/orders_source_tree_version2.txt @@ -54,4 +54,41 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery[0, 1] (choice): + from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip[1, 1]: + codingSystem[0, 1]: string + state[0, 1]: string + value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId[0, 1] (choice): + ace[0, 1]: string + bic[0, 1]: string + lei[0, 1]: string + coordinates[0, 1]: string + extra[0, 1]: + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version0.txt b/tests/sample_models/orders/orders_target_tree_version0.txt index 65a7f71..9e46c7f 100644 --- a/tests/sample_models/orders/orders_target_tree_version0.txt +++ b/tests/sample_models/orders/orders_target_tree_version0.txt @@ -44,4 +44,32 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery_from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + delivery_to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version1.txt b/tests/sample_models/orders/orders_target_tree_version1.txt index 92a8909..2fefeb5 100644 --- a/tests/sample_models/orders/orders_target_tree_version1.txt +++ b/tests/sample_models/orders/orders_target_tree_version1.txt @@ -46,4 +46,34 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery_from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + delivery_to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_ace[0, 1]: string + companyId_bic[0, 1]: string + companyId_lei[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/orders_target_tree_version2.txt b/tests/sample_models/orders/orders_target_tree_version2.txt index 290d877..96df78b 100644 --- a/tests/sample_models/orders/orders_target_tree_version2.txt +++ b/tests/sample_models/orders/orders_target_tree_version2.txt @@ -44,4 +44,32 @@ orders: note[0, 1]: string quantity[1, 1]: integer price[1, 1]: decimal - currency[1, 1]: string \ No newline at end of file + currency[1, 1]: string + delivery_from[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string + delivery_to[0, 1]: + name_attr[0, 1]: string + name[1, 1]: string + address[1, 1]: string + city[1, 1]: string + zip_codingSystem[0, 1]: string + zip_state[0, 1]: string + zip_value[0, 1]: string + country[1, 1]: string + phoneNumber[0, None]: string + companyId_type[0, 1]: string + companyId_value[0, 1]: string + coordinates[0, 1]: string + a_very_long_field_type_that_makes_col_name_exceeds_max_identifier_length[0, 1]: string \ No newline at end of file diff --git a/tests/sample_models/orders/xml/order3.xml b/tests/sample_models/orders/xml/order3.xml index f373357..238dad9 100644 --- a/tests/sample_models/orders/xml/order3.xml +++ b/tests/sample_models/orders/xml/order3.xml @@ -31,6 +31,22 @@ 10 12.3 EUR + + + Warehouse A +
1 Depot Road
+ Lyon + 69001 + FR +
+ + Bob +
string
+ string + 102832 + FR +
+
@@ -41,6 +57,15 @@ 21 70.4 EUR + + + Alice +
string
+ string + 21093 + US +
+
From 28a43c1cf019bfbd7818c943a2c0961375615fce Mon Sep 17 00:00:00 2001 From: Martin Vergier Date: Sat, 13 Jun 2026 07:53:57 +0200 Subject: [PATCH 2/2] Bump version from 0.13.1 to 0.13.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e3f1138..40b0918 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "xml2db" -version = "0.13.1" +version = "0.13.2" authors = [ { name="Commission de régulation de l'énergie", email="opensource@cre.fr" }, ]