如何避免在@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中显式删除name,如下所示:
@Entity
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
implements Equals, HashCode, ToString
{
...
}谢谢,
发布于 2010-07-06 15:39:47
哇,Hyperjaxb现在有了自己的标签。:)
在新版本(0.5.5,即将发布)中,HJ3生成非限定实体名称。参见http://jira.highsource.org/browse/HJIII-34。
https://stackoverflow.com/questions/2572576
复制相似问题