Android ObjectBox无法使用继承生成项目

Android ObjectBox无法使用继承生成项目,android,greendao,objectbox,Android,Greendao,Objectbox,我创建了两个对象。一个延伸另一个。 父对象有一个写在ObjectBox文档中的ID,但我无法生成项目,错误为: Error:[ObjectBox] Code generation failed: No ID property found for "Entity FastCacheData" (use @Id on a property of type long) 缓存数据: 快速缓存数据: 目前不支持实体的多态性,但存在一个问题 @Entity public class CacheData {

我创建了两个对象。一个延伸另一个。 父对象有一个写在ObjectBox文档中的ID,但我无法生成项目,错误为:

Error:[ObjectBox] Code generation failed: No ID property found for "Entity FastCacheData" (use @Id on a property of type long)
缓存数据:

快速缓存数据:


目前不支持实体的多态性,但存在一个问题

@Entity
public class CacheData {
    @Id
    private long id;
    @Index
    private String key;
    @Index
    private Date expirationDate;
    private Date lastUpdated;

    public CacheData(String key, Date expirationDate) {
        this.lastUpdated = new Date();
        this.key = key;
        this.expirationDate = expirationDate;
    }
}
@Entity
public class FastCacheData extends CacheData {
    private String fullName;
    private String thumbnailUrl;
    private boolean isSpam;

    @Convert(converter = DataSource.DataSourceConverter.class, dbType = Integer.class)
    private DataSource photoDataSource;

    @Convert(converter = DataSource.DataSourceConverter.class, dbType = Integer.class)
    private DataSource nameDataSource;

    public FastCacheData(String key, Date expirationDate, String fullName, DataSource nameDataSource, String thumbnailUrl, DataSource photoDataSource, boolean isSpam) {
        super(key, expirationDate);
        this.fullName = fullName;
        this.nameDataSource = nameDataSource;
        this.thumbnailUrl = thumbnailUrl;
        this.photoDataSource = photoDataSource;
        this.isSpam = isSpam;
    }
}