Kinda of embarrassing to ask this question after few years working with Hibernate...
I have a master_table which :
- have some @OneToMany(fetch=FetchType.LAZY, mappedBy="something ")
- and some @ManyToOne(fetch=FetchType.LAZY)
- may have some @OneToOne
- same thing in child_table
I loaded only master_table which gave me about 500 rows. However in the background, it was about 6000 queries made. (quite sure that there is no EAGER)
Question: is that normal ? Is that possible to load this table with just 1 query without impacting lazy loading mechanism, which is working quite very-well here.
Thanks