yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

gson annotations(SerializedName(""), Expose) not retained after the class generation #194

Closed preetb123 closed 8 years ago

preetb123 commented 8 years ago

annotations not retained in the generated class. If this is by design then how to achieve the gson serialization

sbosley commented 8 years ago

This seems to be the same question as issue #189 -- you can refer to the discussion there for ideas.

For the sake of clarity: model specs aren't "real" Java objects, they're just shorthand for generating a table schema. The fields in the spec just generate Property declarations; the generated model class doesn't actually have any fields of its own, so there wouldn't be anywhere to copy the annotations to.

Hope that helps! Let us know if you have other questions.