(id int)
| 65 | } |
| 66 | |
| 67 | func (m *Attachment) Find(id int) (*Attachment, error) { |
| 68 | if id <= 0 { |
| 69 | return m, ErrInvalidParameter |
| 70 | } |
| 71 | o := orm.NewOrm() |
| 72 | err := o.QueryTable(m.TableNameWithPrefix()).Filter("attachment_id", id).One(m) |
| 73 | return m, err |
| 74 | } |
| 75 | |
| 76 | func (m *Attachment) FindListByDocumentId(docId int) (attaches []*Attachment, err error) { |
| 77 | o := orm.NewOrm() |
nothing calls this directly
no test coverage detected