Hello,
hopefully somebody can help me in this problem. It took me a lot of time until now
and I'm still unable to figure out where the problem is.
I'm trying to persist 6 entities simultaneously when calling persist for a Booking entity.
This behavior is the expected one (in the mentioned order):
1. Persist new User entity
2. Persist new UserInfo entity
3. Persist new Customer entity
4. Persist new Property Period entity
5. Persist new Property Period Booked entity
6. Persist new Booking
Unfortunately this is the Hibernate console output:
Code:
01:15:34,936 INFO [STDOUT] Hibernate:
insert
into
user
(password, username)
values
(?, ?)
01:15:34,936 INFO [STDOUT] Hibernate:
insert
into
customer
(regularCustomer, user_id)
values
(?, ?)
01:15:34,936 INFO [STDOUT] Hibernate:
insert
into
property_period
(endDate, groupCode, property_id, startDate)
values
(?, ?, ?, ?)
01:15:34,936 INFO [STDOUT] Hibernate:
insert
into
property_period_booked
(property_period_id)
values
(?)
01:15:34,936 INFO [STDOUT] Hibernate:
insert
into
booking
(bookingDate, user_id, number, property_period_id)
values
(?, ?, ?, ?)
As you can see, UserInfo is not being persisted! Why?!
I prepared a document with more details about my Hibernate mappings:
http://0182.info/Hibernate_Mapping.pdfThanks a lot in advance!