* Reference to contact person
*/
@JoinColumn (name = "company_contact_employee_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.ALL)
+ @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
private Employable companyContactEmployee;
/**
* Reference to CEO "employee"
*/
@JoinColumn (name = "company_founder_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.ALL)
+ @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
private Employable companyFounder;
/**
* Reference to headquarter data
*/
@JoinColumn (name = "company_headquarter_data_id")
- @OneToOne (targetEntity = BusinessHeadquarter.class, cascade = CascadeType.ALL)
+ @OneToOne (targetEntity = BusinessHeadquarter.class, cascade = CascadeType.REFRESH)
private Headquarter companyHeadquarterData;
/**
* Id number of company logo
*/
@JoinColumn (name = "company_logo_id")
- @OneToOne (targetEntity = BusinessLogo.class, cascade = CascadeType.ALL)
+ @OneToOne (targetEntity = BusinessLogo.class, cascade = CascadeType.REFRESH)
private Logo companyLogo;
/**
return false;
} else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
return false;
- } else if (!Objects.equals(this.getCompanyHeadquarterData(), other.getCompanyHeadquarterData())) {
- return false;
- } else if (!Objects.equals(this.getCompanyContactEmployee(), other.getCompanyContactEmployee())) {
- return false;
- } else if (!Objects.equals(this.getCompanyFounder(), other.getCompanyFounder())) {
- return false;
}
return true;
hash = 37 * hash + Objects.hashCode(this.getBasicDataId());
hash = 37 * hash + Objects.hashCode(this.getCompanyName());
- hash = 37 * hash + Objects.hashCode(this.getCompanyHeadquarterData());
- hash = 37 * hash + Objects.hashCode(this.getCompanyContactEmployee());
- hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
return hash;
}