![](/img/trans.png)
[英]hyperjaxb3 0.5.6 customization <hj:generated-value> does not annotate id with @GeneratedValue
[英]How to annotate a generated property as Transient in HyperJaxb3
我只想拥有一个实体的属性为Transient。 HyperJaxb的较旧文档[ 1 ]似乎不可用,Github [ 2 ]上的文档对我没有帮助。
我试图使用可嵌入/可嵌入属性和生成ID结构没有成功。
我有一个如下模型,我想在生成的类中将lastActivityTime作为Transient。 我目前未成功尝试此字段的注释。
<xsd:complexType name="ProcessInstanceGroupDAO">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="archived" type="xsd:boolean"/>
<xsd:element name="lastActivityTime">
<xsd:annotation>
<xsd:appinfo>
<hj:persistence>
<hj:embeddable merge="false">
<orm:embeddable-attributes>
<orm:transient name="lastActivityTime"></orm:transient>
</orm:embeddable-attributes>
</hj:embeddable>
</hj:persistence>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
[1] confluence.highsource.org/display/HJ3/Customization+Guide
[2] https://github.com/highsource/hyperjaxb3/wiki/Customization_Guide
只需使用<hj:ignored/>
对其进行注释。 该属性将使用@Transient
进行注释。
<xsd:complexType name="ProcessInstanceGroupDAO">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="archived" type="xsd:boolean"/>
<xsd:element name="lastActivityTime">
<xsd:annotation>
<xsd:appinfo>
<hj:ignored/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
免责声明:我是Hyperjaxb的作者。 不幸的是,我不再积极开发它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.