Add a ReadOrCreate method:
m := &User{Name: "Kyle"} // Returns a boolean indicating whether the object was created, // the primary key of the object, or an error. created, id, err := orm.ReadOrCreate(m, "Name")
Showing
Please
register
or
sign in
to comment