Here's my situation.
I have a bunch of persisted objects. When flushDirty() is called on any of them, I do some work (e.g. send an email), but only if a certain value is set to true for the current transaction. I decided to store that value in an object that I persist with Hibernate. In the flushDirty(), query for the object and do a criteria.list().
The problem is that this triggers the whole flushDirty process again (to maintain consistency before the criteria.list), and the code goes into an infinite loop. Is there some way that I can get around this and do a query from a flushDirty?
|