Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Jork Zijlstra / Jork Zijlstra (Jork Zijlstra)
Created: 07/22/2015
Components: ORM Support
Versions: 10.0
Failure Type: Usability Issue
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Linux Ubuntu 10.10
Vote Count: 0
Duplicate ID: CF-3737411
Problem Description:
Account.cfc
property name="subscription"
fieldtype="one-to-one"
cfc="subscription"
cascade="delete"
mappedby="account"
inverse="true";
Subscription.cfc
property name="account"
fieldtype="one-to-one"
cfc="Account"
fkcolumn="AccountID"
foreignkeyname="FK_Subscription_Account"
cascade="save-update";
I have 2 object with have an cross relation between each other. When saving and Subscription and then entityLoading the other side (Account) in the same request the relation is not yet there. This is because the relation is only persisted at the end of the request.
Steps to Reproduce:
- createSubscription
- subscription.setaccount(new account())
- entitySave(subScription)
- entityLoading account
Actual Result:
Account doensn't have a relation with subscription yet (only for the same request when saving).
When you entityLoad account in a new request it does have the relation.
Expected Result:
Both relations should be there.
Any Workarounds:
Put a transaction {} around entitySave. Call ormCloseSession ot ormClearSession after that
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4024165
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:
Comments: