Skip to content

Annotations for POJO Documentation #81

@yemikudaisi

Description

@yemikudaisi

Trying out nitrite for the first time. I've decided to stick to POJO as I already have existing entity classes. However, the following annotations in you examples doesn't seem to work. I kept getting this error @org.dizitart.no2.objects.Index is missing a default value for the element 'value'

@Indices({
        @Index(field = "joinDate", type = IndexType.NonUnique),
        @Index(field = "name", type = IndexType.Unique)
})

So I took a look into you source code and realized the correct field is supposed to be value in place of field. So below was what worked at the end of the day. I just thought it was worth mentioning considering the documentation is misleading.

@Indices({
        @Index(value = "joinDate", type = IndexType.NonUnique),
        @Index(value = "name", type = IndexType.Unique)
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions