Are indexes implicitly created for relationships?

#1

Do the following annotations

@OneToMany

@ManyToOne

@ManyToMany

@OneToOne

imply

@Index  ?

Thanks,

Carl

 

#2

Actually these annotations (except @ManyToMany) should apply @Unique on the @One side.

But ObjectDB doesn't apply these indexes automatically, because of their overhead (which most users are not aware of).

You should use the @Index or @Unique annotations explicitly to set indexes.

ObjectDB Support

Reply