[英]Hyperjaxb @Entity
How to avoid declaring fully qualified name of the derived class in @Entity annotation? 如何避免在@Entity批注中声明派生类的完全限定名称? I have the following xsd: 我有以下xsd:
<xsd:complexType name="Project">
<xsd:annotation>
<!-- ... -->
</xsd:annotation>
<xsd:sequence>
<!-- ... -->
</xsd:sequence>
</xsd:complexType>
but it generates the following java source: 但它会生成以下Java源代码:
@Entity(name = "com.mycompany.db.Project")
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
implements Equals, HashCode, ToString
{
...
}
I need to remove explicitly name from @Entity, to be like: 我需要从@Entity显式删除名称,例如:
@Entity
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
implements Equals, HashCode, ToString
{
...
}
Thanks, 谢谢,
Wow, Hyperjaxb now has an own tag on SO. 哇,Hyperjaxb现在在SO上拥有自己的标签。 :) :)
In the new version (0.5.5, to be released soon) HJ3 generates non-qualified entity names. 在新版本(即将发布的0.5.5)中,HJ3生成不合格的实体名称。 See http://jira.highsource.org/browse/HJIII-34 . 参见http://jira.highsource.org/browse/HJIII-34 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.