Entity Annotations

Similarly to JPA annotations, you can define constraints, column definitions and other relationships using Java 1.5 annotations. However, Onyx Database's annotation collection is much smaller and easier to work with.

Annotation Description
@Entity The Entity annotation is the principal metadata used to indicate an object as persistable.
@Identifier Used to indicate the primary key of an entity.
@Attribute Denote persisted attributes for an entity.
@Relationship Specify entity relationships for an entity. Relationships can be specified as either One to One, One To Many, Many to One, or Many to Many.
@Index Entities with indexed attributes can be quickly identified and accessed within large data stores.
@Partition Onyx has the ability to partition entity stores based on an arbitrary attribute value. Use this annotation in order to specify a partition field. There can only be one partition attribute per entity.
  1. Entity Annotation