【发布时间】:2018-04-02 14:57:11
【问题描述】:
我只想拥有一个实体的属性作为瞬态。 HyperJaxb 的旧文档[1] 似乎不可用,Github 上的文档[2] 对我没有帮助。
我尝试使用可嵌入/可嵌入属性和生成的 id 构造,但没有成功。
我有一个模型如下,我想在生成的类中将 lastActivityTime 作为瞬态。该字段的当前注释是我的一次失败的尝试。
<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
【问题讨论】:
标签: java orm transient hyperjaxb