Hyperjaxb @Entity

扶醉桌前 提交于 2020-01-05 08:41:52

问题


How to avoid declaring fully qualified name of the derived class in @Entity annotation? I have the following xsd:

<xsd:complexType name="Project">
        <xsd:annotation>
                <!-- ... -->
        </xsd:annotation>
 <xsd:sequence>
  <!-- ... -->
 </xsd:sequence>
</xsd:complexType>

but it generates the following java source:

@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
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
    implements Equals, HashCode, ToString
{
...
}

Thanks,


回答1:


Wow, Hyperjaxb now has an own tag on SO. :)

In the new version (0.5.5, to be released soon) HJ3 generates non-qualified entity names. See http://jira.highsource.org/browse/HJIII-34.



来源:https://stackoverflow.com/questions/2572576/hyperjaxb-entity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!