表:DoctorMessage
行:
@Column(name = COLUMN_DELIVER_ID, unique = true)
protected Long deliverId;
@Column(name = COLUMN_FROM)
protected Long from;
@Column(name = COLUMN_TO)
protected Long to;
@Column(name = COLUMN_TYP)
protected Integer typ;
@Column
protected String content;
@Column(primaryKey = true, name = COLUMN_GUID)
protected String guid;
@Column(name = COLUMN_CREATED)
protected Long created;
@Column(name = COLUMN_DELETED)
protected Boolean deleted;
@Column(name = COLUMN_SEND_STATUS)
protected Integer sendStatus;
@Column(name = COLUMN_STATUS) // WS.MessageStatus
protected Integer status;
查詢:doctorMessageDao.rawQuery("select * from DoctorMessage where status = ? and `from` = ?",
new String[]{WS.MessageStatus.MSG_READ_VALUE + "", String.valueOf(doctorId)});
坑點: ① from是關鍵字
②`不是單引號,是TAB鍵上面的那個`(英文鍵盤輸入時)