Deprecation warning on ember data models

Just updated to ember v1.12.0-beta.1 and ember-data v1.0.0-beta.16. I get the following warning about discarding fields in my models:

DEPRECATION: Using the same function as getter and setter is deprecated. See http://emberjs.com/deprecations/v1.x/#toc_deprecate-using-the-same-function-as-getter-and-setter-in-computed-properties for more details. 

Inspector Ember. A glance of flaws points to all my models. Thus, I basically get one error from fatigue per line in my model. Here is an example model:

 import DS from 'ember-data'; export default DS.Model.extend({ userid: DS.attr('number'), unitid: DS.attr('number'), log: DS.attr('string'), name: DS.attr('string'), start_date: DS.attr('date'), end_date: DS.attr('date'), duration_mins: DS.attr('number') }); 
+6
source share
1 answer

As @albertjan said, this is a bug and fix already exists. Upgrading to the latest version of Ember Data beta 17 or higher will enable it.

Make this community a wiki answer so that no one misses a comment.

+4
source

Source: https://habr.com/ru/post/984465/


All Articles