mardi 1 mars 2016

activeAndroid retrofit how to change getId() method

I have my model

@Table(name = "MyModelTable")   
public class MyModel extends Model implements Serializable {

            @Column(name = "myModelId")
            private long id;

I know that activeAndroid allready define an id field to store the id from the database in it super class, but I can't change this field seems I'm using retrofit which marshall this object to the json received from the server .

I saw that someones solve the problem by defining

@Table(name = "MyModelTable", id = "_id")

But this show me "id" as an unresolved method.

Anyone have any idea? Thanks

Aucun commentaire:

Enregistrer un commentaire