good morning!!!!

Skip to content
Snippets Groups Projects
Commit 14819b9c authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

MySQL: Fixing SetID() setter in test.

parent 91e9d9c3
Branches
Tags
No related merge requests found
......@@ -99,10 +99,10 @@ func (item ItemWithKey) Constraint() db.Cond {
return cond
}
func (item *ItemWithKey) SetID(keys ...interface{}) error {
func (item *ItemWithKey) SetID(keys map[string]interface{}) error {
if len(keys) == 2 {
item.Code = keys[0].(string)
item.UserID = keys[1].(string)
item.Code = keys["code"].(string)
item.UserID = keys["user_id"].(string)
return nil
}
return errors.New(`Expecting exactly two keys.`)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment