Hi
Inside my DAO method i have
Code:
session.get(OperationSent.class, id, forUpdate? LockMode.UPGRADE : LockMode.READ);
I would like somehow retireve number of sql commands executed against database to retrieve OperationSent object.
OperationSent entity has 3 one-to-one association and i would like to create Junit test to assert that this code produces exactly one sql...
Looking at statistics api i've seen
getQueryExecutionCount() method but it returns 0. After a few experiments i noticed the method returns number greater than 0 only for sql/hql queries.
Is it possible to retrieve number of sqls for session.get() , session.load()
using statistics??
and if not is any workaround to satisfy my test requirement ?
[/code]