Title:
ormClearSession and ormCloseSession causes entityRelations not to be persisted
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Jork Zijlstra / Jork Zijlstra (Jork Zijlstra)
Created: 07/22/2015
Components: ORM Support
Versions: 10.0
Failure Type: Data Loss
Found In Build/Fixed In Build: Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Linux Ubuntu 10.10
Vote Count: 0
Problem Description:
Calling ormClearSession or ormClosession after an entitysave nog all cascading data is saved. When you have on object with an one-to-many property both object are persisted, but not the relation between them.
Steps to Reproduce:
In the zip file I have added the code.
It have an object Test with a one-to-many relation to TestItem
1) Create tables with sql
2) run index.cfm
- it creates an Test object
- it adds an TestItem to Test
- it entitySaves Test
- it calles ormClearSession
3) look at the dumps
Test doens't have an testItem
Actual Result:
In the database a Test and TestItem records is saved. Only in the TestItem table the testID column remains null.
So when entityLoading the Test again it doens't have an testItem.
Expected Result:
When enityLoading the Test again it doens have an testItem.
Any Workarounds:
Put a transaction {} around the entitySave
ormFlush after entitySave doens't help.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4024153
External Customer Info:
External Company:
External Customer Name: Jork
External Customer Email:
External Test Config: My Hardware and Environment details:
Ubuntu 12.04, CF10,0,15,292620
Attachments:
- July 22, 2015 00:00:00: 1_ormflush_1.zip
- July 24, 2015 00:00:00: 2_missing-relation.png
- July 24, 2015 00:00:00: 3_test1.png
Comments: