this model class ...i want insert image file in db using activeandroid .i converted image file bytes ... bytes not stored in db ... field type in table blob
import com.activeandroid.model; import com.activeandroid.annotation.column; import com.activeandroid.annotation.table; @table(name = "contact") public class contact extends model { @column(name = "id") private int id; @column(name = "name") private string name; @column(name = "photo") private string photo; @column(name = "title") private string title; @column(name = "phone") private string phone; @column(name = "email") private string email; @column(name = "memo") private string memo; @column(name = "image") private byte[] _image;`
aa supports saving byte arrays , defining custom type serializer maybe you.from performance view, more useful create column string , image disk or web.
Comments
Post a Comment