Hi,
My Address entity contains no foreign keys, there are two 1:1 relationships pointing to it i.e. the other tables have the foreign key which point to the Address table. These two other Entities (Person and Company) are involved in other relationships to other entities nothing to do with Address.
When I invoke entityManager.find() for an Address entity, Hibernate generates a huge SQL statement. Ìt is a huge Join with 11 sub selects and a selection from 27 tables in total. This seems far too much!
I have no CASCADE option set for any of the relationships?
Why is hibernate doing this or what are my doing wrong?
Any help, advice greatly appreciated.
Regards
|