我创建了两个对象。一个延伸另一个。 父对象有一个ID,因为它的ObjectBox文件中写的,但我不能用的错误生成项目: Error:[ObjectBox] Code generation failed: No ID property found for "Entity FastCacheData" (use @Id on a property of type long)
CacheData:
@Entity
data class EmailMessage (
@Id var id: Long = 0,
var subject: String = "",
var body: String = "",
var attachments: ToMany<Attachment>? = null,
)
for'attachments',有没有更好的方式
即时尝试为类创建对象框,但我不需要保存该特定类的所有值。我只在运行时使用的值的 一部分,所以没有指向它们保存在数据库 IV试图寻找在你的网站,但使用 IM找不到有关排除值的任何文件Android和科特林 例如: class Timer(var total : Long) {
//i dont need to save it. use it for runtime only
va
在我的代码我把一些基础领域中的抽象基类BaseEntity: public abstract class BaseEntity {
@Id
private long id;
public BaseEntity() {
}
public BaseEntity(long id) {
this.id = id;
}