Skip to main content
Participant
Mar 13, 2013 3:20 PM UTC
Question

ORM Help

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Participating Frequently
Mar 14, 2013 1:59 PM UTC

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

Translate