I see that greenDao prefers not to use annotations for DAO and TO generation due to performance issues. However what if I still need to annotate for instance a TO for parser purposes? Is there any way to achieve that?
Example:
If we create a Customer entity with GreenDAO code generation, it will create the CustomerDAO and the Customer classes, right?
So, what if I`m consuming SOAP webservices, which returns a Customer object, and to facilitate parsing this Customer object I use an annotated kind of framework like simpleXML. Is there any way to change the Customer class without loose every annotation when regenerating code with GreenDAO?
Thanks!
You can add annotations with greendao 2.0 like this
entity.addStringProperty("title").codeBeforeField("@com.google.gson.annotations.SerializedName( \"title\" )");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With