 }

    // On CustomerRecord class:

    &#064;OneToOne(optional=false, mappedBy="customerRecord")
    public Customer getCustomer() { return customer; }


    Example 2: One-to-one association that assumes both the source and target share the same primary key values. 

    // On Employee class:

    &#064;Entity
    public class Employee {
        &#064;Id Integer id;
    
        &#064;OneToOne &#064;MapsId
        EmployeeInfo info;
        ...
    }

    // On EmployeeInfo class:

    &#064;Entity
    p