根据指定字段查询一条文档.
(field string, v interface{})
| 155 | |
| 156 | //根据指定字段查询一条文档. |
| 157 | func (m *Document) FindByFieldFirst(field string, v interface{}) (*Document, error) { |
| 158 | o := orm.NewOrm() |
| 159 | err := o.QueryTable(m.TableNameWithPrefix()).Filter(field, v).One(m) |
| 160 | return m, err |
| 161 | } |
| 162 | |
| 163 | //根据指定字段查询一条文档. |
| 164 | func (m *Document) FindByBookIdAndDocIdentify(BookId, Identify interface{}) (*Document, error) { |
nothing calls this directly
no test coverage detected