Skip to content

Commit

Permalink
odb code gen: Allows us to control method creation for schema relations
Browse files Browse the repository at this point in the history
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 <fgaray@google.com>
  • Loading branch information
fgaray committed Feb 15, 2024
1 parent 354fb0a commit e9227a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/odb/src/codeGenerator/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit e9227a6

Please sign in to comment.