Return to v2.4 docs


Model Object Miscellaneous Functions boolean model

Returns true if this object hasn't been saved yet (in other words, no matching record exists in the database yet). Returns false if a record exists.

// Create a new object and then check if it is new (yes, this example is ridiculous. It makes more sense in the context of callbacks for example)
employee = model("employee").new()>
<cfif employee.isNew()>
    // Do something...

Related Functions

Miscellaneous Functions