objectbox-java
objectbox-java copied to clipboard
Allow @Entity to override same name property of @BaseEntity
Trying to add same name variable in Entity
which is already defined in parent class annotated by BaseEntity
.
@Entity
public class Child extends Parent {
@Id(assignable = true)
public long id;
}
@BaseEntity
public class Parent {
@Id
public long id;
}
Building the project throws the following error:
error: [ObjectBox] Could not add property: Duplicate name "id" in entity "Child": [Property id of Child] vs. [Property id of Child] (com.mecofarid.myapplication.Child.id) public long id;
Is there any workaround or method to override the same name variable in the child class?
Note: Removing BaseEntity
annotation from Parent
class builds successfully
Nope, this is currently not supported.