I have next code
getEntityManager().persist(country.getCity().getClinic().getPatient());
and see next sql in log
Hibernate:
select
next value for patient_seq
from
dual_patient_seq
Hibernate:
select
next value for clinic_seq
from
dual_lclinic_seq
Hibernate:
select
next value for city_seq
from
dual_city_seq
But sequence for ‘country’ isn’t generated. All XML are allright. Whan is the problem?
Thx, Thomas! Problem was in ‘cascade’. I change City.hbm.xml from
to
and it was helpful!