Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] @IndexColumn vs OrderColumn

Hi All,

We are having the following entity in hibernate

@Entity(name="CATS")
public class Categories
{

 @OneToMany(fetch=FetchType.EAGER,
cascade={CascadeType.MERGE,CascadeType.PERSIST})
    @JoinTable(name="CATS_CAT",
joinColumns=@JoinColumn(name="CATS_ID"),
inverseJoinColumns=@JoinColumn(name="CATEGORIES_ID"))
    @IndexColumn(name="POS", base=1)


    private List<Category> categories ;

}

and we want to convert them to eclipselink..

@Entity(name="CATS")
public class Categories
{

 @OneToMany(fetch=FetchType.EAGER,
cascade={CascadeType.MERGE,CascadeType.PERSIST})
    @OrderColumn(name="POS")
    @JoinTable(name="CATS_CAT",
joinColumns=@JoinColumn(name="CATS_ID"),
inverseJoinColumns=@JoinColumn(name="CATEGORIES_ID"))
    @PrivateOwned

    private List<Category> categories ;

}


The issue that we are having is with the Order Column . We are not
able to set the POS attribute on the OrderColumn annotation. Is there
a way to do this in eclipselink?

Otherwise we have to go through loops trying to get the tests running
with both these technologies since the entities are kind of shared
between the two implementations and we just have two different entity
managers working on the same set of entities.

Thx


Back to the top