我用以下方式定义了绑定
<jaxb:bindings node="xs:complexType[@name='Parent']">
...........
<jaxb:bindings node="xs:element[@name='children']">
<hj:one-to-many name="children" fetch="EAGER">
<orm:order-column name="CHILD_PRIMARY_KEY"/>
<orm:join-column name="PARENT_PRIMARY_KEY"/>
</hj:one-to-many>
</jaxb:bindings>
</jaxb:bindings>
But the generated class has OrderColumn annotation missing.
i.e
@OneToMany(targetEntity = Children.class, cascade = {
CascadeType.ALL
}, fetch = FetchType.EAGER)
@JoinColumn(name = "PARENT_PRIMARY_KEY")
public List<Children> getChildren() {
if (Childrens== null) {
childrens= new ArrayList<Children>();
}
return this.childrens;
}
我期待使用OneToMany和JoinColumn的OrderColumn注解。但是它好像不在那里,有人能帮我看看我是不是遗漏了什么?
发布于 2012-05-11 05:21:36
您应该将您的org\jvnet\hyperjaxb3\ejb\plugin\custom\applicationContext.xml
移至org\jvnet\hyperjaxb3\ejb\jpa2\plugin\custom\applicationContext.xml
。
https://stackoverflow.com/questions/9382760
复制相似问题