mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Used @Repeatable feature from JDK8 for @Indices
This commit is contained in:
@@ -16,5 +16,5 @@ public @interface Indices {
|
||||
/**
|
||||
* Array with {@link Index} definitions.
|
||||
*/
|
||||
Index[] indices() default {};
|
||||
Index[] value() default {};
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class AnnotationClass extends AnnotationParser {
|
||||
|
||||
Indices indices = AnnotationBase.findAnnotation(cls, Indices.class);
|
||||
if (indices != null) {
|
||||
for (Index index: indices.indices()) {
|
||||
for (Index index: indices.value()) {
|
||||
descriptor.addIndex(new IndexDefinition(index.columnNames(), index.name(), index.unique()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
|
||||
Indices indices = get(prop, Indices.class);
|
||||
if (indices != null) {
|
||||
for (Index index: indices.indices()) {
|
||||
for (Index index: indices.value()) {
|
||||
addIndex(prop, index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user