You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you try making your new property nullable, like var date: Long?.
The issue is that ObjectBox will map a null database entry to your non-nullable type, which for Long is 0. If you make the property nullable ObjectBox should set it to null instead.
greenrobot-team
changed the title
When creating a new entity field, the existing records are not pupulated with the default value on that field
New property does not have Kotlin default value when getting existing entity
Feb 26, 2019
ObjectBox 2.3.3
In Kotin, when we create a field on an existing entity, the field on the existing records is not pupulated with the default value.
Example:
Before
Entity
After
Result:
Field date content: 0
shouldn't have the
Date.now().toMillis()
value?The text was updated successfully, but these errors were encountered: