[hibernate-dev] firing proper events after HQL?

Emmanuel Bernard emmanuel at hibernate.org
Tue Nov 24 04:08:26 EST 2009

This user use case is not compelling enough.
This query could be rewritten em.remove em.getReference(Product.class,  
4) );

but generally speaking, what do you want to do? Fire a bunk event? I  
think working around the issue is better handled when the actual bulk  
query is executed as you have first hand knowledge (instead of parsing  
and analyzing whatt he query might be doing).

In Hibernate Search's case, just call em.index(...) / purge(...)  
either directly or asynchronously.

On 23 nov. 09, at 19:49, Sanne Grinovero wrote:

> Hello,
> a user on forums is posting about an HQL like
> "delete from product where id = 4"
> which - in case of Hibernate Search - is not going to remove the
> relevant document from the index.
> Another interesting case would be
> "delete from product"
> Any thoughts about this? Should we always use API when making changes?
> (https://forum.hibernate.org/viewtopic.php?f=9&t=1001076)
> Sanne
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

More information about the hibernate-dev mailing list