(id int, cols ...string)
| 181 | } |
| 182 | |
| 183 | func (m *Book) Find(id int, cols ...string) (book *Book, err error) { |
| 184 | if id <= 0 { |
| 185 | return |
| 186 | } |
| 187 | o := orm.NewOrm() |
| 188 | err = o.QueryTable(m.TableNameWithPrefix()).Filter("book_id", id).One(m, cols...) |
| 189 | return m, err |
| 190 | } |
| 191 | |
| 192 | func (m *Book) Update(cols ...string) (err error) { |
| 193 | o := orm.NewOrm() |
no test coverage detected