How to fix the deprecation "Using the same function as getter and setter is deprecated."

Hi, I’m trying to update from Ember 1.11.1 to Ember 1.12.0-beta.3 and seeing this deprecation:

DEPRECATION: Using the same function as getter and setter is deprecated. See [http://emberjs.com/deprecations/v1.x/#toc_computed-properties-with-a-shared-getter-and-setter][1] for more details.
at ember$data$lib$system$relationships$belongs$to$$belongsTo [as belongsTo]

for the following line:

channel: DS['default'].belongsTo('channel')

I read up on it but couldn’t figure out what to change.

1 Like

I believe this is am Ember Data issue where it is using a shared setter/getter. You have to upgrade to ember data beta 17 (maybe 18) to have this deprecation go away

Thanks, that did the trick.