fix order pkey fields
This commit is contained in:
parent
85ed3d9b79
commit
a8c8da34b2
|
@ -19,8 +19,10 @@
|
|||
|
||||
{% macro decl_struct(o, extra = '') %}
|
||||
|
||||
{% set pkey_fields = token(o, 'table_pkey')|split(',') %}
|
||||
{% set pkey = o.fields|filter(f => f.name in pkey_fields ) %}
|
||||
{% if has_token(o, 'table') %}
|
||||
{% set pkey_fields = token(o, 'table_pkey')|split(',') %}
|
||||
{% set pkey = pkey_fields|map(f => o.fields[f]) %}
|
||||
{% endif %}
|
||||
|
||||
{%- if o.parent and has_token(o, 'POD') -%}
|
||||
{{Error("@POD structs can't have a parent: " ~ o.name)}}
|
||||
|
|
Loading…
Reference in New Issue