好吧,我找到了答案,我不知道这是否显而易见。
基本上,我刚把我的基础等级定为a级
@MappedSuperClass
例如
@MappedSuperclass
public class _Asset extends EnvironmentModel<Integer> {
@Id
@Column
@PrimaryKey
@Attribute(index = 0)
private int assetId;
@Column
@Attribute(index = 1)
private String make;
etc..
}
然后我延长了我的
Asset
桌子和
AssetView
从映射的超类中。
@Entity
@Table(name = "assets")
public class Asset extends _Asset {
}
--
@Entity
@View(name = "assets_view")
public class AssetView extends _Asset {
public static final Model.Find<Integer, AssetView> finder = new Model.Finder<>(AssetView.class);
}