Open TechNov opened 3 years ago
If you mark a field as transient
ObjectBox will ignore it as well. But every entity class is required to have a @Id
property.
Edit: it is best to have a separate model for your database (here ObjectBox) and whatever model you use with Gson to avoid issues like this.
:rotating_light: First, please check:
Describe the bug A clear and concise description in English of what the bug is.
Basic info (please complete the following information):
Hello, i'm tying to ignore an id protriety in my Gson converto serialization, like this
@Entity public class MyClass { @Id transient long id; ...}
and a got this error[ObjectBox] No @Id property found for 'MyClass ', add @Id on a not-null long property.
Help.