这有效:
@MappedSuperclass
public class ExtendableTranslation extends Model {
public String label;
}
@Entity
public class LeagueT extends ExtendableTranslation {
@Id
public Integer id;
}
但是如果我将id字段移动到超类:
@MappedSuperclass
public class ExtendableTranslation extends Model {
public String label;
@Id
public Integer id;
}
@Entity
public class LeagueT extends ExtendableTranslation {
}
我有一个错误:
[RuntimeException:java.lang.NoSuchMethodError:models.translations.LeagueT._ebean_setni_id(Ljava / lang / Integer;)V]
所有其他带注释的字段(@ManyToOne,@ OneToMany)都是一样的。这是一个错误还是我做错了什么?