@Data
@Entity(name = "project")
public class ProjectA extends BaseEntity { ... }
@Data
@Entity(name = "project")
public class ProjectB extends BaseEntity { ... }
这样的情况,该如何处理。
相同启动会报:
Entities share the same JPA entity name: [project] which is not allowed!**
换成
@Data
@Entity(name = "project")
public class ProjectAEntity extends BaseEntity { ... }
@Data
@Entity(name = "project")
@Table(name = "project")
public class ProjectBEntity extends BaseEntity { ... }
报错
Not a managed type: class ...ProjectBEntity
查了很多,但是没什么实际上的效果,关于多个实体映射同一张表,有什么好的解决办法吗?