users@jaxb.java.net

Re: Order-Column does not seem to work

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 22 Feb 2012 09:59:59 +0100

Hi,

>  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;
>    }
> Please can someone help what i am missing here? i am expecting the
> getChildren to have Ordercolumn annotation too.

Should work actually, I've got this in my tests:

                                                <hj:one-to-many>
                                                        <orm:order-column/>
                                                </hj:one-to-many>


Would you please file an issue:

http://jira.highsource.org/browse/HJIII

Please use users_at_hyperjaxb.java.net ML further on.

Bye,
/lexi