tracker issue : CF-4204018

select a category, or use search below
(searches all categories and all time range)
Title:

cftransaction still flushes the session before it executes

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Luis M. / ()

Created: 02/12/2019

Components: ORM Support

Versions: 13.0

Failure Type: Others

Found In Build/Fixed In Build: all /

Priority/Frequency: Normal /

Locale/System: / Chrome

Vote Count: 0

Problem Description:

I really thought this was something that was a thing of the past.  If I set automanage session to false, why in the world is the cftransaction flushing the hibernate session before it starts. 

This is not only erronous to do, but can get people in trouble as any object loaded before the transaction will be flushed.  This behavior SHOUL NEVER happened.  The only realistic way to avoid this is to wrap my entire request in a transaction, this way, I am guaranteeing something.  

Can you please explain why in the world you flush the session before a transaction?

Steps to Reproduce:

Set this.automanagesession = false.

Load an entity, change some data, then start a transaction, even if the transaction fails, the data in the previous entity will still be flushed.

Actual Result:

Expected Result:

Any Workarounds:

Attachments:

Comments: