java - Hibernate Criteria and HQL will go to database by default? -
java - Hibernate Criteria and HQL will go to database by default? -
we know session.get() go database session.load() not. how criteria , hql?
i worrying synchronization between persistent objects , database. shown in this unit test result manual monitoring of database, hibernate's behaviors not expected or manual said.
so of import me know if straight go database result or looking @ persistent objects.
yes, go database (unless queries marked cachable, , query cache enabled, , query results in query cache). if entities returned query exist in session, existing entities returned.
note test case linked doesn't create much sense: modifying entity , flushing session should done within transaction.
java hibernate
Comments
Post a Comment