ORMLite 存储所有 class 字段注释

ORMLite store all class fields annotation

最近,我使用 ORMLite,发现 ORMLite 的 @DatabaseField 注释具有 persisted 值 (link).

Set this to be false (default true) to not store this field in the database. This is useful if you want to have the annotation on all of your fields but turn off the writing of some of them to the database.

该文档说明建议可以在所有 class 字段上添加注释。 ORMLite 是否有提供 'store all fields' 功能的注释? 或者还有另一种方法可以做到这一点,而不是将 @DatabaseField 添加到 class.

中的每个字段

Does ORMLite have any annotation which provides 'store all fields' feature? Or there is another way to do that instead adding @DatabaseField to every field in class.

抱歉,不,不是。无法使用注释来保留所有字段。在 ORMLite 中还有其他 configure a class 方法,但 none 会自动添加有关所有字段的详细信息。