Model Object
allChanges()
Signature
Section titled “Signature”allChanges() — returns struct
Available in: model
Category: Change Functions
Description
Section titled “Description”Returns a struct detailing all changes that have been made on the object but not yet saved to the database.
Examples
Section titled “Examples”// Get an object, change it, and then ask for its changes (will return a struct containing the changes, both property names and their values).
member = model("member").findByKey(params.memberId);
member.firstName = params.newFirstName;
member.email = params.newEmail;
allChanges = member.allChanges();