I'm wondering how I can set the defualt value
for an int
in a DatabaseField
in OrmLite for Android.
I have tried:
@DatabaseField(defaultValue = 0)
int intValue;
But all I get is a compilation error. Or can you even do this with int's?
You can simply assign a value to your intValue in the class.
@DatabaseField()
int intValue=10;
This makes intValue 10 by default, until you set it to something else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With