From 88cde6e4e673d0dae8e916a5a758b1523e72d574 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 14 Dec 2019 02:02:14 +0300 Subject: [PATCH] orm: skip fields --- vlib/compiler/query.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/compiler/query.v b/vlib/compiler/query.v index 7bfd8937e9..99d5cdd916 100644 --- a/vlib/compiler/query.v +++ b/vlib/compiler/query.v @@ -64,6 +64,9 @@ fn (p mut Parser) select_query(fn_ph int) string { println('orm: skipping $field.name') continue } + if field.attr.contains('skip') { + continue + } fields << field } if fields.len == 0 { @@ -88,6 +91,7 @@ fn (p mut Parser) select_query(fn_ph int) string { println('orm: skipping $field.name') continue } + p.register_var({ field | is_mut: true, is_used:true, is_changed:true }) } q += table_name + 's'