When an attribute has been modified, but has not yet been saved to the
server, it is considered “dirty”. Use #isDirty() to see if any attribute is dirty, use the #changes() method to see all dirty attributes.
Typescript
Javascript
Remember, only dirty attributes are sent to the server when #save()
is called.
#isDirty()can take into account relationships - just pass a
string, array, or object or relationship names. A relationship is
considered dirty if:
Any objects in the relationship have dirty attributes
An object was removed from a hasMany relationship
An object was added to a hasMany relationship
Any object within the relationship was replaced with a different
object.