Skip to main content
Participant
March 13, 2013
Question

ORM Help

  • March 13, 2013
  • 1 reply
  • 416 views

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?

This topic has been closed for replies.

1 reply

Participating Frequently
March 14, 2013

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)>