Skip to content

Commit

Permalink
fix repo registration order
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquetc committed Mar 9, 2024
1 parent 572938a commit 0d11cbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class {{ name }} : public {{ parent }}
};


{{ name }}() : {{ parent }}() {{ fields_init_values }}, m_metaData(this)
{{ name }}() : {{ parent }}(), m_metaData(this) {{ fields_init_values }}
{
}

Expand All @@ -87,7 +87,7 @@ class {{ name }} : public {{ parent }}
}

{{ name }}( {% for field in parent_fields %} const {{ field.type }} &{{ field.name }}, {% endfor %} {% for field in fields %}{% if field.type in ['int', 'double', 'float', 'bool'] %} {{ field.type }} {{ field.name }}{% else %} const {{ field.type }} &{{ field.name }}{% endif %}{% if not loop.last %}, {% endif %} {% endfor %})
: {{ parent }}({{ parent_fields | map(attribute='name') | join(", ")}}), {% for field in fields %}m_{{ field.name }}({{ field.name }}){% if not loop.last %}, {% endif %}{% endfor %}, m_metaData(this)
: {{ parent }}({{ parent_fields | map(attribute='name') | join(", ")}}), m_metaData(this), {% for field in fields %}m_{{ field.name }}({{ field.name }}){% if not loop.last %}, {% endif %}{% endfor %}
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ PersistenceRegistration::PersistenceRegistration(QObject *parent) : QObject{pare
if (initResult.hasError())
{
Error error = initResult.error();
qCritical() << error.className() + "\n" + error.code() + "\n" + error.message() + "\n" + error.data();
qCritical() << error.className() + "\n"_L1 + error.code() + "\n"_L1 + error.message() + "\n"_L1 + error.data();
}

// repositories:
{% for entity in entities[::-1] %}
{% for entity in entities %}
{{ entity.entity_pascal_name }}Repository *{{ entity.entity_camel_name }}Repository = new {{ entity.entity_pascal_name }}Repository({{ entity.entity_camel_name }}DatabaseTableGroup
{% for child in entity.children_entities %}, {{ child.child_camel_name }}Repository{% endfor %});
{%- endfor %}
Expand Down

0 comments on commit 0d11cbd

Please sign in to comment.