Return to v2.0 docs

allChanges()


Model Object Change Functions struct model


Returns a struct detailing all changes that have been made on the object but not yet saved to the database.

// 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();

Related Functions

Change Functions