nitrite-java
                                
                                 nitrite-java copied to clipboard
                                
                                    nitrite-java copied to clipboard
                            
                            
                            
                        @Indices is not neccessary to use, multiple @Index annotations on class are allowed
I think you can modify example in https://nitrite.dizitart.com/java-sdk/repository/entity/index.html#indices to not use wrapper @Indices. I've looked into code and I think you load @Index annotations with and without @Indices, so no code should is needed.
Before Java 8, a container annotation was required as wrapper to use multiple instances of the same annotation. As of Java 8, this is no longer necessary. Instead, these annotations should be used directly without a wrapper, resulting in cleaner and more readable code.
This:
@Indices({
        @Index(fields = "id", type = IndexType.UNIQUE),
        @Index(fields = "partNumber", type = IndexType.UNIQUE),
})
public class MyClass implements Serializable
can be replaced with:
@Index(fields = "id", type = IndexType.UNIQUE)
@Index(fields = "partNumber", type = IndexType.UNIQUE)
public class MyClass implements Serializable
https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html
Yes you are right. These are legacy code which was not cleaned up properly.