Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

Ember tries to resolve an relationship while ID is set to ''

$
0
0

@Rick_Meertens wrote:

Hi Guys,

I'am having an issue with Ember trying to resolve an empty relationship, while no ID is set but an empty string.

For example I have a User model with an relationship 'state' like the following:

//User
Name: DS.attr('string'),
State: DS.belongsTo('state')

When I retrieve an user object from the server with state is set to "", ember tries to resolve the 'state' relationship by calling '/states' from the server. When I set manually the 'state' to undefined Ember will not try to resolve..

Is this a bug?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles