如何避免在@Entity 注解中声明派生类的完全限定名?我有以下xsd:
<xsd:complexType name="Project">
<xsd:annotation>
<!-- ... -->
</xsd:annotation>
<xsd:sequence>
<!-- ... -->
</xsd:sequence>
</xsd:complexType>
但它会生成以下 java 源代码:
@Entity(name = "com.mycompany.db.Project")
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
implements Equals, HashCode, ToString
{
...
}
我需要从@Entity 中明确删除名称,就像:
@Entity
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
implements Equals, HashCode, ToString
{
...
}
谢谢,