entityNew
Description
Creates a new instance of the persistent CFC with the entity name that you provide.
Categories
Related
History
ColdFusion
9: Added this function.
Syntax
entityNew(entityName)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| entityName | Entity name of the persistent CFC. |
Returns
Object
Example
newArtistObj = 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();