1
0
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:
Dialga 2021-08-07 06:25:38 +12:00 committed by GitHub
parent e1cc1665dc
commit 25d49bc615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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),')