Copy link to clipboard
Copied
I am dumping obj = entityloadbypk('teams', 1) - http://i.imgur.com/B2Vp3qn.png
How would I remove a particular email address? If I try email = entityloadbypk('emails', 1), then obj.removeemail(email), I get an error that says "Column 'team' cannot be null".
What exactly should I pass to this argument?
Copy link to clipboard
Copied
Coldfusion ORM provide EntityDelete() method which is delete the record from the database for the specified entity. Depending on the cascade attribute specified in the mapping, it also deletes the associated objects.
<cfset test = EntityLoad('emails', 1, true)>
<cfscript>
WriteDump(test);
</cfscript>
<cfset EntityDelete(test)>