order-column does not seem to work

扶醉桌前 提交于 2019-12-11 04:59:03

问题


I have defined my bindings in the following way

 <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;
    } 

I am expecting OrderColumn annotation with OneToMany and JoinColumn. But it does not seem to be there, please can some one help whether i am missing something here?


回答1:


You should move your org\jvnet\hyperjaxb3\ejb\plugin\custom\applicationContext.xml to org\jvnet\hyperjaxb3\ejb\jpa2\plugin\custom\applicationContext.xml.



来源:https://stackoverflow.com/questions/9382760/order-column-does-not-seem-to-work

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