When a new record is created using Ember Data, then get("isDirty")
returns true. But as yet, the user has made no changes to the record, and we can discard it without losing any of the user's work.
Is there any official, supported way to detect this situation, where a record has been created but no properties have been set?
(There's in incomplete answer to this question for a much older version of Ember Data, before it was substantially overhauled. The didSetProperty
function still exists in current releases, but it's undocumented. Still, it might be a possible path to a solution if nothing official can be found.)