{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10209","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10209/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10209/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10209/events","html_url":"https://github.com/emberjs/ember.js/issues/10209","id":54239884,"number":10209,"title":"Ember.Map: You must use Ember.set() to set the `size` property","user":{"login":"frederikbosch","id":1552577,"avatar_url":"https://avatars.githubusercontent.com/u/1552577?v=3","gravatar_id":"","url":"https://api.github.com/users/frederikbosch","html_url":"https://github.com/frederikbosch","followers_url":"https://api.github.com/users/frederikbosch/followers","following_url":"https://api.github.com/users/frederikbosch/following{/other_user}","gists_url":"https://api.github.com/users/frederikbosch/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikbosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikbosch/subscriptions","organizations_url":"https://api.github.com/users/frederikbosch/orgs","repos_url":"https://api.github.com/users/frederikbosch/repos","events_url":"https://api.github.com/users/frederikbosch/events{/privacy}","received_events_url":"https://api.github.com/users/frederikbosch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/emberjs/ember.js/labels/Needs%20Label%20Review","name":"Needs Label Review","color":"c7def8"},{"url":"https://api.github.com/repos/emberjs/ember.js/labels/Needs%20Team%20Discussion","name":"Needs Team Discussion","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-01-13T19:55:58Z","updated_at":"2015-02-16T15:37:43Z","closed_at":null,"body":"You must use Ember.set() to set the `size` property (of [object Object]) to `2`.\r\n\r\nI receive this error when adding a value to a map. I am on version 1.8.1. Upgrading to 1.9.* is not an option for me at this stage.\r\n\r\nTrace:\r\nEmber assert...\r\nhttps://github.com/emberjs/ember.js/blob/v1.8.1/packages/ember-metal/lib/properties.js#L35\r\nhttps://github.com/emberjs/ember.js/blob/v1.8.1/packages/ember-metal/lib/map.js#L326\r\n\r\nI do not get why the mandatory setter is complaining. Is the value wrong? Why was it not a problem to insert the first item? How do I overcome this without upgrading?"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/74526319","html_url":"https://github.com/emberjs/ember.js/issues/10209#issuecomment-74526319","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10209","id":74526319,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T15:37:43Z","updated_at":"2015-02-16T15:37:43Z","body":"> This enables you to execute a function when the composition of the collection changes\r\n\r\nObserving `size` is insufficient, as mutation of the Map or Set doesn't just include `add` `remove`, but also `replace`, which results in no `size` change event.\r\n\r\nFor now, Map and OrderedSet are meant as a fast partial polyfills for ES2015 `Map` and `Set`. So that, we can swap them out for native implementations when a sufficient number of vendors support them.\r\n\r\nAdditionally, we are currently re-evaluating our current array change detection strategies, as the approach is extremely likely to change any additional observation plans for `Map` and `OrderedSet` remain on hold."}}