Home » Support » Forum » Are indexes implicitly created for relationships?

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 @Uniquejavax.jdo.annotations.UniqueJDO annotationAnnotation for a database unique constraint.See JavaDoc Reference Page... 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
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login