persistence
persistence copied to clipboard
support for conditional index
Hi, I think it would be very useful to add in Index.java
a property called condition
/ where
, to use in DB types that support the feature.
For example:
@Target({})
@Retention(RUNTIME)
public @interface Index {
/**
* (Optional) The name of the index; defaults to a provider-generated name.
*/
String name() default "";
/**
* (Required) The names of the columns to be included in the index,
* in order.
*/
String columnList();
/**
* (Optional) Whether the index is unique.
*/
boolean unique() default false;
/**
* (Optional) The contents of the where clause while creating the index.
*/
String where() default "";
}
Useful for indicies on tables with logical deletion, or many other cases