fix: 修复代码生成主子表功能异常的问题
This commit is contained in:
@@ -145,7 +145,7 @@ class {{ BusinessName }}Dao:
|
||||
:param {{ businessName }}: {{ functionName }}对象
|
||||
:return:
|
||||
"""
|
||||
db_{{ businessName }} = {{ ClassName }}(**{{ businessName }}.model_dump(exclude={% raw %}{{% endraw %}{% if table.sub %}'{{ subclassName }}_list, '{% endif %}{% for column in columns %}{% if not column.insert %}'{{ column.python_field | camel_to_snake }}'{% if not loop.last %}, {% endif %}{% endif %}{% endfor %}{% raw %}}{% endraw %}))
|
||||
db_{{ businessName }} = {{ ClassName }}(**{{ businessName }}.model_dump(exclude={% raw %}{{% endraw %}{% if table.sub %}'{{ subclassName }}_list', {% endif %}{% for column in columns %}{% if not column.insert %}'{{ column.python_field | camel_to_snake }}'{% if not loop.last %}, {% endif %}{% endif %}{% endfor %}{% raw %}}{% endraw %}))
|
||||
db.add(db_{{ businessName }})
|
||||
await db.flush()
|
||||
|
||||
|
Reference in New Issue
Block a user