Does it also serialize inherited properties?
@IgnoreExtraProperties
public class Item extend BaseObservable {
private String foo;
public Item() { }
@Bindable
public String getFoo() {
return this.foo;
}
}
Does it also serialize inherited properties?
@IgnoreExtraProperties
public class Item extend BaseObservable {
private String foo;
public Item() { }
@Bindable
public String getFoo() {
return this.foo;
}
}
I just ran into the same issue and found your question. While I could not find a definitive answer elsewhere, some experimentation revealed that neither public
fields nor getters are inherited.
Since my base class is abstract, I just made the fields protected and implemented getters to return them in each subclass. The repetition isn't ideal, but my objects are now saving in Firebase with the inherited fields.