Skip to content

Commit 6d56639

Browse files
author
asvln
authored
orm: quote table and field name in [references] (#19387)
1 parent cb9584f commit 6d56639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/orm/orm.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ pub fn orm_table_gen(table string, q string, defaults bool, def_unique_len int,
572572
unique_fields << f
573573
}
574574
if references_table != '' {
575-
stmt += ' REFERENCES ${references_table} (${references_field})'
575+
stmt += ' REFERENCES ${q}${references_table}${q}(${q}${references_field}${q})'
576576
}
577577
fs << stmt
578578
}

0 commit comments

Comments
 (0)