views:

82

answers:

1

Hibernate provides a mechanism to define multi column indexes via the Table. Is there a way to specify this is an ORM agnostic fashion via JPA or JPA2 (e.g. using the javax.persistence.* APIs)

+1  A: 

No, as hinted in my answer to your previous question, there is no standardized way, you have to use provider extensions for that (when they exist).

Pascal Thivent
just curious to know, as per your earlier suggestion we are using hibernate annotations for this purpose. It makes sense to support this, when JPA already has support for single column Index annotation. Just my 2 cents
@user339108 I personally agree and I'd like JPA to support this too. Maybe in a future version.
Pascal Thivent
@user339108 Can you provide an example to your statement "JPA already has support for single column Index annotation". I couldn't find any annotation allowing this other then the @Index annotation provided by Hibernate.
jaxvy