Onyx Database: Entity Relationships

Onyx Database supports every kind of relationship a typical relational database has to offer. You can define composite and aggregate objects, the cardinality as well as fetch policies.

One to One Relationship
Entity with a corresponding One to One relationship
This tutorial contains a simple example of how to persist an entity with a One to One relationship
One to Many Relationship
Persisting and hydrating an entity with One to Many relationship
This tutorial contains a simple example of how to persist an entity with a One to Many relationship and how to hydrate that entity.
Many to Many Relationship
Persisting and hydrating an entity with Many to Many relationship
This tutorial contains a simple example of how to persist an entity with a Many to Many relationship and how to hydrate that entity.
Cascade Policy / Batch Saving Relationship Associations
Cascade Policy determines how the object graph is persisted and allows you to batch save relationship associations by reference
This tutorial contains examples of how to batch save relationships without having to save or initialize entities and showcases how the Cascade Policy can help.
Fetch Policy / Lazy Loading Relationships
The fetch policy determines whether you require relationships are loaded lazily or eagerly
This tutorial contains examples of how to lazy load relationships, or eagerly load relationships.