Ilya
Ilya

Reputation: 29731

Convert Timestamp date MyDate class using Hibernate

Let i have class,

class MyDate {
    org.joda.DateTime date;
    Character flag;
}

and i have field MyDate in main class

class MainClass {
    MyDate optionalDate;
}

What annotations do I need if date is stored in Column DATE_COL, and flag is stored in column FLAG_COL?

Upvotes: 0

Views: 147

Answers (1)

Bhesh Gurung
Bhesh Gurung

Reputation: 51030

What annotations do I need if date is stored in Column DATE_COL, and flag is stored in column FLAG_COL?

You need to use the @Column annotation. e.g. @Column(name="DATE_COL") and @Column(name="FLAG_COL").

Upvotes: 1

Related Questions