From 926785c5ec60316358c05f0b61b1b3c2e94f4fac Mon Sep 17 00:00:00 2001 From: Andrej Date: Wed, 4 Jun 2025 17:40:49 +0500 Subject: [PATCH] ifc2sql - fix should_get_inverses for mysql --- src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py index d2013ed57a..dba99dc1f1 100644 --- a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py +++ b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py @@ -475,15 +475,18 @@ class Patcher(ifcpatch.BasePatcher): elif isinstance(primitive, tuple): data_type = "JSON" else: - print(attribute, primitive) # Not implemented? + print("Possibly not implemented attribute data type:", attribute, primitive) if not self.is_strict or derived[i]: optional = "DEFAULT NULL" else: optional = "DEFAULT NULL" if attribute.optional() else "NOT NULL" statement += f" `{attribute.name()}` {data_type} {optional}," + if self.should_get_inverses: + statement += "inverses JSON, " + if self.should_expand: - statement = statement[0:-1] + statement = statement.removesuffix(",") else: statement += " PRIMARY KEY (`ifc_id`)"