NOTE
This function has been enhanced in ColdFusion 9.0.1 to support multiple data sources in the same application. |
Creates an instance of the persistent CFC with the entity name that you provide.
Object
EntityNew(entityName,[properties="",ignoreExtras=false])
Parameter |
Description |
|---|---|
entityName |
Entity name of the persistent CFC. |
properties |
Key-value pair (ColdFusion struct) of property names and values. |
EntityLoad, EntityLoadByExample, EntityDelete, ColdFusion ORM chapter in Developing ColdFusion Applications
ColdFusion 9: Added this function.
The enhancement in ColdFusion 9.0.1 allows the application to initialize the object that is being created. properties takes a struct with key being the property name. When the object is created, all the properties are populated with the passed struct.For example,
<cfset artistObj = entityNew("Artists",{FirstName="Tom",LastName="Ron"})> |
newArtistObj = EntityNew("Artists");
|
Sign in to your account