ColdFusion 9.0 Resources |
EntityNewDescriptionAdds an entity instance to the existing data source Returnsobject CategoryFunction SyntaxentityNew( entityName) ParametersentityName: Name of the instance being created. See AlsoEntityLoad, EntityLoadByExample, EntityDelete ColdFusion ORM chapter in Developing ColdFusion Applications ExamplenewArtistObj = EntityNew("Artists"); newArtistObj.setfirstname("John"); newArtistObj.setlastname("Smith"); newArtistObj.setaddress("5 Newport lane"); newArtistObj.setcity("San Francisco"); newArtistObj.setstate("CA"); newArtistObj.setPostalCode("90012"); newArtistObj.setphone("612-832-2343"); newArtistObj.setfax("612-832-2344"); newArtistObj.setemail("jsmith@company.com"); newArtistObj.setThePassword("jsmith"); EntitySave(newartistobj); ormflush(); |