Recently, I use ORMLite and I found that ORMLite's @DatabaseField
annotation have persisted
value
(link).
Set this to be false (default true) to not store this field in the database. This is useful if you want to have the annotation on all of your fields but turn off the writing of some of them to the database.
That documentation note suggest that there is way to have annotation on all of class fields. Does ORMLite have any annotation which provides 'store all fields' feature? Or there is another way to do that instead adding @DatabaseField to every field in class.
Does ORMLite have any annotation which provides 'store all fields' feature? Or there is another way to do that instead adding @DatabaseField to every field in class.
Sorry but no it doesn't. There is no way using annotations to have all field be persisted. There are other ways to configure a class in ORMLite but none that will automatically add details about all fields.