Hibernate:
select
employee0_.EMPLOYEE_ID as EMPLOYEE1_0_,
employee0_.EMPLOYEE_FAX as EMPLOYEE2_0_,
employee0_.EMPLOYEE_PHONE as EMPLOYEE3_0_,
employee0_.EMPLOYEE_CITY as EMPLOYEE4_0_,
employee0_.EMPLOYEE_STREET as EMPLOYEE5_0_,
employee0_.EMPLOYEE_ZIPCODE as EMPLOYEE6_0_,
employee0_.EMPLOYEE_FATHER_NAME as EMPLOYEE7_0_,
employee0_.EMPLOYEE_FIRST_NAME as EMPLOYEE8_0_,
employee0_.EMPLOYEE_LAST_NAME as EMPLOYEE9_0_,
employee0_.EMPLOYEE_SEX as EMPLOYEE10_0_,
employee0_.EMPLOYEE_REGISTRATION_NUMBER as EMPLOYEE11_0_
from
EMPLOYEE employee0_
where
employee0_.EMPLOYEE_ID=?
Hibernate:
select
transfers0_.EMPLOYEE_ID as EMPLOYEE6_4_,
transfers0_.EMPLOYEE_TRANSFER_ID as EMPLOYEE1_4_,
transfers0_.EMPLOYEE_TRANSFER_ID as EMPLOYEE1_10_3_,
transfers0_.EMPLOYEE_TRANSFER_DATE_COMMUNICATION as EMPLOYEE2_10_3_,
transfers0_.EMPLOYEE_TRANSFER_DATE_FINISH as EMPLOYEE3_10_3_,
transfers0_.EMPLOYEE_TRANSFER_DATE_START as EMPLOYEE4_10_3_,
transfers0_.DESCRIPTION as DESCRIPT5_10_3_,
transfers0_.EMPLOYEE_ID as EMPLOYEE6_10_3_,
transfers0_.EMPLOYEE_TRANSFER_TAX_OFFICE_ID as EMPLOYEE7_10_3_,
transfers0_.EMPLOYEE_TRANSFER_TYPE_ID as EMPLOYEE8_10_3_,
taxoffice1_.TAX_OFFICE_ID as TAX1_18_0_,
taxoffice1_.TAX_OFFICE_CODE as TAX2_18_0_,
taxoffice1_.TAX_OFFICE_FAX as TAX3_18_0_,
taxoffice1_.TAX_OFFICE_PHONE as TAX4_18_0_,
taxoffice1_.TAX_OFFICE_CITY as TAX5_18_0_,
taxoffice1_.TAX_OFFICE_STREET as TAX6_18_0_,
taxoffice1_.TAX_OFFICE_ZIPCODE as TAX7_18_0_,
taxoffice1_.TAX_OFFICE_NAME as TAX8_18_0_,
taxoffice1_.TAX_OFFICE_TYPE_ID as TAX9_18_0_,
taxofficet2_.TAX_OFFICE_TYPE_ID as TAX1_19_1_,
taxofficet2_.TAX_OFFICE_TYPE_NAME as TAX2_19_1_,
transferty3_.TRANSFER_TYPE_ID as TRANSFER1_16_2_,
transferty3_.TRANSFER_TYPE_NAME as TRANSFER2_16_2_,
transferty3_.TRANSFER_TYPE_PERMANENT as TRANSFER3_16_2_
from
EMPLOYEE_TRANSFER transfers0_
left outer join
TAX_OFFICE taxoffice1_
on transfers0_.EMPLOYEE_TRANSFER_TAX_OFFICE_ID=taxoffice1_.TAX_OFFICE_ID
left outer join
TAX_OFFICE_TYPE taxofficet2_
on taxoffice1_.TAX_OFFICE_TYPE_ID=taxofficet2_.TAX_OFFICE_TYPE_ID
left outer join
TRANSFER_TYPE transferty3_
on transfers0_.EMPLOYEE_TRANSFER_TYPE_ID=transferty3_.TRANSFER_TYPE_ID
where
transfers0_.EMPLOYEE_ID=?
order by
transfers0_.EMPLOYEE_TRANSFER_DATE_FINISH asc
Hibernate:
select
specialiti0_.EMPLOYEE_ID as EMPLOYEE3_2_,
specialiti0_.EMPLOYEE_SPECIALITY_ID as EMPLOYEE1_2_,
specialiti0_.EMPLOYEE_SPECIALITY_ID as EMPLOYEE1_2_1_,
specialiti0_.SPECIALITY_DATE as SPECIALITY2_2_1_,
specialiti0_.EMPLOYEE_ID as EMPLOYEE3_2_1_,
specialiti0_.EMPLOYEE_SPECIALITY_TYPE_ID as EMPLOYEE4_2_1_,
speciality1_.SPECIALITY_TYPE_ID as SPECIALITY1_14_0_,
speciality1_.SPECIALITY_TYPE_NAME as SPECIALITY2_14_0_
from
EMPLOYEE_SPECIALITY specialiti0_
left outer join
SPECIALITY_TYPE speciality1_
on specialiti0_.EMPLOYEE_SPECIALITY_TYPE_ID=speciality1_.SPECIALITY_TYPE_ID
where
specialiti0_.EMPLOYEE_ID=?
order by
specialiti0_.SPECIALITY_DATE asc
Hibernate:
select
seminars0_.EMPLOYEE_ID as EMPLOYEE5_1_,
seminars0_.EMPLOYEE_SEMINAR_ID as EMPLOYEE1_1_,
seminars0_.EMPLOYEE_SEMINAR_ID as EMPLOYEE1_6_0_,
seminars0_.EMPLOYEE_SEMINAR_DATE_FINISH as EMPLOYEE2_6_0_,
seminars0_.EMPLOYEE_SEMINAR_DATE_START as EMPLOYEE3_6_0_,
seminars0_.EMPLOYEE_ID as EMPLOYEE5_6_0_,
seminars0_.EMPLOYEE_SEMINAR_TITLE as EMPLOYEE4_6_0_
from
EMPLOYEE_SEMINAR seminars0_
where
seminars0_.EMPLOYEE_ID=?
order by
seminars0_.EMPLOYEE_SEMINAR_DATE_START asc
Hibernate:
select
medicals0_.EMPLOYEE_ID as EMPLOYEE4_1_,
medicals0_.EMPLOYEE_MEDICAL_ID as EMPLOYEE1_1_,
medicals0_.EMPLOYEE_MEDICAL_ID as EMPLOYEE1_8_0_,
medicals0_.EMPLOYEE_MEDICAL_DATE as EMPLOYEE2_8_0_,
medicals0_.EMPLOYEE_MEDICAL_DESCRIPTION as EMPLOYEE3_8_0_,
medicals0_.EMPLOYEE_ID as EMPLOYEE4_8_0_
from
EMPLOYEE_MEDICAL medicals0_
where
medicals0_.EMPLOYEE_ID=?
order by
medicals0_.EMPLOYEE_MEDICAL_DATE asc
Hibernate:
select
languages0_.EMPLOYEE_ID as EMPLOYEE4_2_,
languages0_.EMPLOYEE_LANGUAGE_ID as EMPLOYEE1_2_,
languages0_.EMPLOYEE_LANGUAGE_ID as EMPLOYEE1_5_1_,
languages0_.EMPLOYEE_LANGUAGE_DATE as EMPLOYEE2_5_1_,
languages0_.EMPLOYEE_ID as EMPLOYEE4_5_1_,
languages0_.EMPLOYEE_LANGUAGE_TITLE as EMPLOYEE3_5_1_,
languages0_.EMPLOYEE_LANGUAGE_TYPE_ID as EMPLOYEE5_5_1_,
languagety1_.LANGUAGE_TYPE_ID as LANGUAGE1_15_0_,
languagety1_.LANGUAGE_TYPE_CODE as LANGUAGE2_15_0_,
languagety1_.LANGUAGE_TYPE_NAME as LANGUAGE3_15_0_
from
EMPLOYEE_LANGUAGE languages0_
left outer join
LANGUAGE_TYPE languagety1_
on languages0_.EMPLOYEE_LANGUAGE_TYPE_ID=languagety1_.LANGUAGE_TYPE_ID
where
languages0_.EMPLOYEE_ID=?
order by
languages0_.EMPLOYEE_LANGUAGE_DATE asc
Hibernate:
select
educations0_.EMPLOYEE_ID as EMPLOYEE4_1_,
educations0_.EMPLOYEE_EDUCATION_ID as EMPLOYEE1_1_,
educations0_.EMPLOYEE_EDUCATION_ID as EMPLOYEE1_4_0_,
educations0_.EMPLOYEE_EDUCATION_DATE as EMPLOYEE2_4_0_,
educations0_.EMPLOYEE_ID as EMPLOYEE4_4_0_,
educations0_.EMPLOYEE_EDUCATION_TITLE as EMPLOYEE3_4_0_
from
EMPLOYEE_EDUCATION educations0_
where
educations0_.EMPLOYEE_ID=?
order by
educations0_.EMPLOYEE_EDUCATION_DATE asc
Hibernate:
select
disciplina0_.EMPLOYEE_ID as EMPLOYEE4_1_,
disciplina0_.EMPLOYEE_DISCIPLINARY_ID as EMPLOYEE1_1_,
disciplina0_.EMPLOYEE_DISCIPLINARY_ID as EMPLOYEE1_9_0_,
disciplina0_.EMPLOYEE_DISCIPLINARY_DATE as EMPLOYEE2_9_0_,
disciplina0_.EMPLOYEE_DISCIPLINARY_DESCRIPTION as EMPLOYEE3_9_0_,
disciplina0_.EMPLOYEE_ID as EMPLOYEE4_9_0_
from
EMPLOYEE_DISCIPLINARY disciplina0_
where
disciplina0_.EMPLOYEE_ID=?
order by
disciplina0_.EMPLOYEE_DISCIPLINARY_DATE asc
Hibernate:
select
degrees0_.EMPLOYEE_ID as EMPLOYEE3_2_,
degrees0_.EMPLOYEE_DEGREE_ID as EMPLOYEE1_2_,
degrees0_.EMPLOYEE_DEGREE_ID as EMPLOYEE1_3_1_,
degrees0_.DEGREE_DATE as DEGREE2_3_1_,
degrees0_.EMPLOYEE_ID as EMPLOYEE3_3_1_,
degrees0_.EMPLOYEE_DEGREE_TYPE_ID as EMPLOYEE4_3_1_,
degreetype1_.DEGREE_TYPE_ID as DEGREE1_12_0_,
degreetype1_.DEGREE_TYPE_NAME as DEGREE2_12_0_
from
EMPLOYEE_DEGREE degrees0_
left outer join
DEGREE_TYPE degreetype1_
on degrees0_.EMPLOYEE_DEGREE_TYPE_ID=degreetype1_.DEGREE_TYPE_ID
where
degrees0_.EMPLOYEE_ID=?
order by
degrees0_.DEGREE_DATE asc
Hibernate:
select
categories0_.EMPLOYEE_ID as EMPLOYEE3_2_,
categories0_.EMPLOYEE_CATEGORY_ID as EMPLOYEE1_2_,
categories0_.EMPLOYEE_CATEGORY_ID as EMPLOYEE1_1_1_,
categories0_.CATEGORY_DATE as CATEGORY2_1_1_,
categories0_.EMPLOYEE_ID as EMPLOYEE3_1_1_,
categories0_.EMPLOYEE_CATEGORY_TYPE_ID as EMPLOYEE4_1_1_,
categoryty1_.CATEGORY_TYPE_ID as CATEGORY1_13_0_,
categoryty1_.CATEGORY_TYPE_NAME as CATEGORY2_13_0_
from
EMPLOYEE_CATEGORY categories0_
left outer join
CATEGORY_TYPE categoryty1_
on categories0_.EMPLOYEE_CATEGORY_TYPE_ID=categoryty1_.CATEGORY_TYPE_ID
where
categories0_.EMPLOYEE_ID=?
order by
categories0_.CATEGORY_DATE asc
Hibernate:
select
accusation0_.EMPLOYEE_ID as EMPLOYEE5_1_,
accusation0_.EMPLOYEE_ACCUSATION_ID as EMPLOYEE1_1_,
accusation0_.EMPLOYEE_ACCUSATION_ID as EMPLOYEE1_7_0_,
accusation0_.EMPLOYEE_ACCUSATION_DATE as EMPLOYEE2_7_0_,
accusation0_.EMPLOYEE_ACCUSATION_DESCRIPTION as EMPLOYEE3_7_0_,
accusation0_.EMPLOYEE_ID as EMPLOYEE5_7_0_,
accusation0_.EMPLOYEE_ACCUSATION_EPONYM as EMPLOYEE4_7_0_
from
EMPLOYEE_ACCUSATION accusation0_
where
accusation0_.EMPLOYEE_ID=?
order by
accusation0_.EMPLOYEE_ACCUSATION_DATE asc
Code:
Hibernate:
update
EMPLOYEE_ACCUSATION
set
EMPLOYEE_ID=null
where
EMPLOYEE_ID=?
I think the problem is on [coded] lines
The class Employee has many others associassions