From e9227a65772b9a8b91078626a5227946e4c6f721 Mon Sep 17 00:00:00 2001 From: Felipe Garay Date: Wed, 14 Feb 2024 17:43:40 -0800 Subject: [PATCH] odb code gen: Allows us to control method creation for schema relations Use case: adding "flags" to the relations in schema.json so we can pass "no-get" to prevent the generation of default get methods Signed-off-by: Felipe Garay --- src/odb/src/codeGenerator/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odb/src/codeGenerator/gen.py b/src/odb/src/codeGenerator/gen.py index b93b72bc63c..3298f54f532 100755 --- a/src/odb/src/codeGenerator/gen.py +++ b/src/odb/src/codeGenerator/gen.py @@ -125,7 +125,7 @@ def get_json_files(directory): inParentField["table"] = True inParentField["dbSetGetter"] = True inParentField["components"] = [inParentField["name"]] - inParentField["flags"] = ["cmp", "serial", "diff", "no-set", "get"] + inParentField["flags"] = ["cmp", "serial", "diff", "no-set", "get"] + relation.get("flags", []) if "schema" in relation: inParentField["schema"] = relation["schema"]