mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
orm: improve an fkey error a bit
This commit is contained in:
parent
e8dbd2c0c7
commit
c45c36ccce
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
pub struct ClientState {
|
pub struct ClientState {
|
||||||
mut:
|
pub mut:
|
||||||
state State = .closed // current state of connection
|
state State = .closed // current state of connection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ fn (mut g Gen) write_orm_insert_with_last_ids(node ast.SqlStmtLine, connection_v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if f_key == '' {
|
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
|
fkeys << f_key
|
||||||
info := sym.array_info()
|
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
|
// TODO: move to the ORM checker
|
||||||
if fkey == '' {
|
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()
|
info := sym.array_info()
|
||||||
arr_typ := info.elem_type
|
arr_typ := info.elem_type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue