You can download the code for this example here:
The core features of an Object Relationship Mapping (ORM) Database is to create relationships. The One to One relationship is used to constrain the cardinality to a single object.
Below illustrates how to use the @Relationship annotation to define a relationship to a Skipper.
Below illustrates how to use the @Relationship annotation to define the inverse entity to the Sailboat.
This piece of code will associate the skipper to the sailboat.
After persisting, Onyx will automatically correlate the sailboat attribute on the skipper entity.
Our goal is to bring about change by enabling people to use simple and quality software in order to make sad engineers happy.