/**
* Cellphone number
*/
- @JoinColumn (name = "contact_cellphone_number_id", referencedColumnName = "cellphone_id")
+ @JoinColumn (name = "contact_cellphone_number_id", referencedColumnName = "cellphone_id", unique = true)
@OneToOne (targetEntity = CellphoneNumber.class, cascade = CascadeType.ALL)
private DialableCellphoneNumber contactCellphoneNumber;
/**
* Fax number
*/
- @JoinColumn (name = "contact_fax_number_id", referencedColumnName = "fax_id")
+ @JoinColumn (name = "contact_fax_number_id", referencedColumnName = "fax_id", unique = true)
@OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
private DialableFaxNumber contactFaxNumber;
/**
* Phone number
*/
- @JoinColumn (name = "contact_phone_number_id", referencedColumnName = "phone_id")
+ @JoinColumn (name = "contact_phone_number_id", referencedColumnName = "phone_id", unique = true)
@OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
private DialableLandLineNumber contactPhoneNumber;