1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: improve an fkey error a bit

This commit is contained in:
Alexander Medvednikov 2023-05-24 18:30:37 +02:00
parent e8dbd2c0c7
commit c45c36ccce
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ const (
)
pub struct ClientState {
mut:
pub mut:
state State = .closed // current state of connection
}

View File

@ -288,7 +288,7 @@ fn (mut g Gen) write_orm_insert_with_last_ids(node ast.SqlStmtLine, connection_v
}
}
if f_key == '' {
verror('An field which holds an array, needs a fkey defined')
verror('a field which holds an array, needs a fkey defined ("${sym.name}")')
}
fkeys << f_key
info := sym.array_info()
@ -911,7 +911,7 @@ fn (mut g Gen) write_orm_select(node ast.SqlExpr, connection_var_name string, le
}
// TODO: move to the ORM checker
if fkey == '' {
verror('An field which holds an array, needs a `fkey` defined')
verror('fn field which holds an array, needs a `fkey` defined ("${sym.name}")')
}
info := sym.array_info()
arr_typ := info.elem_type