1 Reply Latest reply on Mar 14, 2013 7:01 AM by ColdFusionDevshop

    ORM Help

    aaadobeee Level 1

      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?

        • 1. Re: ORM Help
          ColdFusionDevshop Level 1

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




          <cfset EntityDelete(test)>