mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
orm: handle empty fields (#11083)
This commit is contained in:
parent
e1cc1665dc
commit
25d49bc615
@ -222,6 +222,8 @@ fn (mut g Gen) sql_insert(node ast.SqlStmtLine, expr string, table_name string,
|
||||
g.write('orm__${typ}_to_primitive(${node.object_var_name}.$f.name),')
|
||||
}
|
||||
g.write('})')
|
||||
} else {
|
||||
g.write('NULL')
|
||||
}
|
||||
g.write('),')
|
||||
g.write('.types = new_array_from_c_array(0, 0, sizeof(int), NULL),')
|
||||
|
Loading…
Reference in New Issue
Block a user