Embeddeble正在创建2个表jpa springs
我的分数低于100分 AbstractOrderEntry:Embeddeble正在创建2个表jpa springs,spring,spring-boot,hibernate,spring-data-jpa,spring-data,Spring,Spring Boot,Hibernate,Spring Data Jpa,Spring Data,我的分数低于100分 AbstractOrderEntry: @Getter @Setter public class AbstractOrderEntry implements Serializable { @ElementCollection private List<DiscountValue> discountValues = new ArrayList<>();} } 贴现价值实体: @Embeddable @Getter @Setter public
@Getter @Setter
public class AbstractOrderEntry implements Serializable
{
@ElementCollection
private List<DiscountValue> discountValues = new ArrayList<>();}
}
贴现价值实体:
@Embeddable
@Getter @Setter
public class DiscountValue {
private String code;
private BigDecimal value;
private BigDecimal appliedValue;
}
当我启动服务器时,它会生成如下表
cart_discountValue
cart_discountvalue
一个带camelcase,另一个带小写。
我们也在为order实体扩展AbstractOrderEntry,因此也为order创建了两个表
如何克服此问题。由于此问题,表数据未正确持久化。
谢谢,不客气。
Sree1。令人困惑的是/为什么
AbstractXXXClass
不是abstract
…2。为什么不“映射”或“实体”?()同意。它是由其他人实现的,现在处于支持状态。无法返回并修改该类
cart_discountValue
cart_discountvalue