Welcome to the repo. This is a small Ember JS app that demonstrates an inconsistency within the Ember-data library specifically in date transform from v4.12.0 onwards.
The issue arises when the Ember-data date transform triggers a change on the reload of a record even when the value remains the same. This behavior is not consistent with non-date attributes of the same record.
-
Pull the repo, run
yarn install
, runyarn start
-
View the console for the output of the change event.
-
A date attribute 'createdAt' is being logged every time the 'Reload record' button is clicked.
-
For comparison, the non-date attributes "name" (string transform) and "isFake" (boolean transform) are also logged at the same event.
-
Notice that while 'createdAt' is logged every time on reload, the other attributes are not.
The application.hbs
file in this repo illustrates the bug in action:
I welcome your suggestions and feedback, and would be very appreciative of help in resolving this.