@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Index
unique=false
and primary=true
will be ignored.
Only one index per class hierarchy may be marked as primary
.
If index auto generation is turned on then classes containing @Index
will be used. Indexes will always be generated with the containing class's label and
the annotated property's name.
Index generation behaviour can be defined in ogm.properties
by
defining a property called: indexes.auto
and providing
a value of:
assert
: drop all indexes and constraints then create
constraints and indexes on startup. No indexes or constraints will be dropped on
shutdown.validate
: confirm that the required indexes and constraints
defined already exist on startup otherwise abort startupdump
: will generate a file in the current directory with the
cypher commands to create indexes and constraints. Before doing this it will run the
same behaviour as validate.none
: do not generate any constraints or indexes
[default]public abstract boolean unique
@Deprecated public abstract boolean primary
Copyright © 2015–2019 Neo Technology, Inc.. All rights reserved.