Query for rows with serialized fields

65 views
Skip to first unread message

albatross 20

unread,
Jul 13, 2015, 12:46:18 PM7/13/15
to ormlit...@googlegroups.com
Hello,

hello. I am having a class like this:

Code hier eingeb
@DatabaseTable
public class Address {

   
@DatabaseField(generatedId = true)
   
private int id;
   
@DatabaseField
    private String country;
   
@DatabaseField
    private String state;
   
@DatabaseField
    private String city;
   
@DatabaseField
    private String street;
   
@DatabaseField
    private String houseNumber;
   
@DatabaseField(dataType = DataType.SERIALIZABLE)
   
private Coordinate coordinate;
   ....
}

I know I can store this Object with the serialized data type "Coordinate". But how to querry it? When I store an Address instance and later query for it, the coordinate field has got default values. Here I read In this post

http://stackoverflow.com/questions/26967755/android-ormlite-query-by-serializable-object

I read that serializeable classes can be stored in the DB by OrmLite but serializable fields can not be queried. Is that write? If it is then why can I write it to the database and not read it???

Best Regards
Reply all
Reply to author
Forward
0 new messages