Return to v2.5.0 docs

changedProperties()


Model Object Change Functions string model


Returns a list of the object properties that have been changed but not yet saved to the database.

// Get an object, change it, and then ask for its changes (will return a list of the property names that have changed, not the values themselves)
member = model("member").findByKey(params.memberId);
member.firstName = params.newFirstName;
member.email = params.newEmail;
changedProperties = member.changedProperties();

Related Functions

Change Functions