The @javax.persistence.OneToOne
annotation
defines a single-valued association to another entity that has
one-to-one multiplicity. In Naked Objects' terms this is again a
property whose return type is another entity.
In fact, this is just a special case of
@ManyToOne
. In the database we again end up with
a foreign key in the referencing entity to the referenced entity.
It is not normally necessary to specify the associated referenced entity explicitly since it can usually be inferred from the type of the object being referenced.