Search code examples
androidactiveandroid

ActiveAndroid column naming convention for a multi-word column name


I am using ActiveAndroid to build the SQLite database for my Todo Android app. I need to name a column "due_date" but am not sure how to name it in the annotation. Here is a snippet of my Item model:

@Table(name = "Items")
public class Item extends Model {

    @Column(name = "Name")
    private String name;

    @Column(name = "?")
    private Date dueDate;
...

What should the 'name' part of my Column annotation be for the dueDate field? Should it be "DueDate" or "Due_Date" or "Due Date"?

Thank you.


Solution

  • It's entirely up to you. But do not use spaces and other special characters.

    I recommended to follow the same style everywhere, so Items, Name,DueDate, DueDateWhatever,...