Sahana P
Sahana P

Reputation: 73

Does Sugar ORM take serialized name for the column name?

I want to know if the Sugar ORM take serialized name for the column name in the database. For eg..

In my pojo,

public class myPojo implements Serializable{

@SerializedName("id")
String program_id;

.....
}

What does Sugar ORM take as the columnName, "id" or "program_id" ?

Upvotes: 0

Views: 608

Answers (1)

Mathieu de Brito
Mathieu de Brito

Reputation: 2696

Keep in mind that @SerializedName just to the mapping between GSON and your objects. For the underlying SQLite database that Sugar manages, you would still have the correspondence:

String program_id ----> "PROGRAM_ID"

Sources: https://github.com/satyan/sugar/issues/86

Upvotes: 1

Related Questions