Will HQL query use Hibernate second-level cache
问题 I would like to clarify some points regarding the secondary level cache of hibernate. The point to clarify is, will the HQL queries always hit the database (at least for getting ids). Consider we have entities class Customer { long id; // Primary key String name; set <Address> addressList; // One to many relationship } class Address{ long id; // Primary key String houseName; } The database table for the Address has a foreign key reference to the Customer (id) to support one to many