As per my understanding when console is showing generated query its hitting the database right?
Another question is why it did not generate the queries select max(id) from MyProject1.person, select max(id) from MyProject1.Address at line C and D as it should get latest max value of ID for person and address from database in case some other session inserted a new person in between?
Similarily why it did not generate the query select person0_.id as id0_0_, person0_.cname as cname0_0_, person0_.addressId as addressId0_0_ from MyProject1.person person0_ where person0_.id=? at line E and F .How does session come to know that person for id 2 and 3 is not updated by any other session.
Not sure how session is behaving and how does it decide when to hit database/Generate query?