tracker issue : CF-3040942

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

Bug 82100:Saving an entity which had a property set while inside of a <cftransaction> block causes the oldData structure of the preUpdate event handler to be empty for subsequent saves

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Mike Nicholls / Mike Nicholls (mikenicholls)

Created: 02/15/2010

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,0,251028 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

Saving an entity which had a property set while inside of a <cftransaction> block causes the oldData structure of the preUpdate event handler to be empty for subsequent saves.
Method:

Application.cfc---------------<cfcomponent><cfset this.name = "ORMTest"><cfset this.datasource = "cfartgallery"><cfset this.ormSettings = {eventHandling = true}><cfset this.ormEnabled = true></cfcomponent>Art.cfc-------<cfcomponent persistent="true" table="Art"><cffunction name="preUpdate"><cfargument name="oldData" type="struct"><cfdump var="#arguments.oldData#"></cffunction></cfcomponent>index.cfm---------<!--- Load some art ---><cfset firstArt = entityLoadByPK("Art", 1)><cfset secondArt = entityLoadByPK("Art", 2)><cfset thirdArt = entityLoadByPK("Art", 3)><!--- Set some values to force an update when we save ---><cfset firstArt.setArtName("First test " & getTickCount())><!--- Set something on one of the entities while inside a cftransaction ---><cftransaction><cfset secondArt.setArtName("Second test " & getTickCount())></cftransaction><cfset thirdArt.setArtName("Third test " & getTickCount())><!--- Save them ---><cfset EntitySave(firstArt)><cfset EntitySave(secondArt)><cfset EntitySave(thirdArt)>
Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3040942

External Customer Info:
External Company:  
External Customer Name: Mike Nicholls
External Customer Email: 1932664644160A2F992015D5
External Test Config: 02/15/2010

Attachments:

Comments: