Skip to content

Entity property named as default is not working #1113

@freddie1129

Description

@freddie1129

Description

If the entity property is named as default as String type, the property value cannot be saved into box.
We can use put operation to save the entity into box, but the value of the property named as default is always empty.

For example, if we define an entity as below

@Entity 
data class Note(
  @Id var id: Long = 0,
  var default: String? = null,
)

The value of the property default will always blank when read it from box, even though this property has non-blank value when written into the box.

Basic info

  • ObjectBox version: 3.2.1, 3.5.1, just test these two version
  • Reproducibility: Yes
  • Device: [SAMSUNG SM-T630]
  • OS: [e.g. Android 12]

To Reproduce
Simply change the property text's name to default in the example project to reproduce it.
https://github.com/objectbox/objectbox-examples/blob/main/android-app-kotlin/src/main/java/io/objectbox/example/kotlin/Note.kt

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions