boyd4715
boyd4715

Reputation: 2729

Possible to upgrade jboss 5.1 jpa1 to jpa 2

Is it possible to upgrade Hibernate/JPA that is shipped with JBoss 5.1 to use JPA 2.0? I am interested in making use of the OrderColumn.

I am unable to upgrade JBoss to the latest version - 6

Upvotes: 1

Views: 1453

Answers (1)

Pascal Thivent
Pascal Thivent

Reputation: 570345

Is it possible to upgrade Hibernate/JPA that is shipped with JBoss 5.1 to use JPA 2.0?

No.

I am interested in making use of the OrderColumn.

Hibernate has an @IndexColumn equivalent.

2.4.6.2.1. List

Beyond EJB3, Hibernate Annotations supports true List and Array. Map your collection the same way as usual and add the @IndexColumn. This annotation allows you to describe the column that will hold the index. You can also declare the index value in DB that represent the first element (aka as base index). The usual value is 0 or 1.

@OneToMany(cascade = CascadeType.ALL)
@IndexColumn(name = "drawer_position", base=1)
public List<Drawer> getDrawers() {
    return drawers;
}

References

Upvotes: 1

Related Questions