[hibernate-dev] Native query and auto-flush

Steve Ebersole steve at hibernate.org
Thu Oct 30 11:45:56 EDT 2014


Guillaume, it depends unfortunately.  In distributed cases, checking the
status of a transaction could mean remote calls.  That's why I was saying
I'd rather not have the unnecessary overhead if not needed.

On Thu, Oct 30, 2014 at 9:51 AM, Guillaume Smet <guillaume.smet at gmail.com>
wrote:

> On Thu, Oct 30, 2014 at 2:56 PM, Steve Ebersole <steve at hibernate.org>
> wrote:
> > Personally having entities dirtied as part of a read-only transaction
> sounds
> > like an application bug to me.  We could try to detect a read-only
> > transaction state (not sure how we'd do that across all cases) and
> > circumvent the flush there, but that would add unnecessary overhead to
> > applications that do the right thing.
>
> They aren't dirtied as part of the read-only transaction per se but I
> agree with you it's more an application bug (it's due to the way we're
> dealing with empty embedded).
>
> Just wanted to report it in case it was easy and free to test the
> transaction status!
>


More information about the hibernate-dev mailing list