When you run a JPQL update or delete query, is Hibernate smart enough to invalidate the 2nd-level cache for the entity that is changed?
Contrived example:
You have the JPQL:
update Product p set p.status = 'S' where p.name like 'Monitor%'
If you currently have products in the 2nd-level cache when that statement is run, will Hibernate invalidate all products from the cache or does it do nothing to the cache and the products in the 2nd level cache are now invalid?
Just FYI... I'm using JBoss 5.1 with Hibernate and JBossCache