Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure snapshot.belongsTo() and hasMany() do not return deleted records #3170

Merged

Conversation

ianstarz
Copy link
Contributor

@ianstarz ianstarz commented Jun 3, 2015

Even though we remove records from their opposite relationships once they are deleted, this commit places this functionality under test and ensures that only non deleted records are returned from snapshot.belongsTo() and snapshot.hasMany().

Closes #3081

Even though we remove records from their opposite relationships once they
are deleted, this commit places this functionality under test and ensures
that only non deleted records are returned from snapshot.belongsTo() and
snapshot.hasMany().

Closes emberjs#3081
@ianstarz
Copy link
Contributor Author

ianstarz commented Jun 3, 2015

@igorT said we may want to ensure this functionality even though tests pass without the implementation in the snapshot package. At the very least, we do want the test coverage I believe.

@@ -246,7 +262,7 @@ test("snapshot.belongsTo() and snapshot.hasMany() returns correctly when setting
});
});

test("snapshot.hasMany() returns ID if option.id is set", function() {
test("snapshot.belongsTo() returns ID if option.id is set", function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test was incorrectly named

igorT added a commit that referenced this pull request Jun 3, 2015
…eted-records

Ensure snapshot.belongsTo() and hasMany() do not return deleted records
@igorT igorT merged commit 6538bc2 into emberjs:master Jun 3, 2015
@ianstarz ianstarz deleted the snapshot-relationships-for-deleted-records branch June 3, 2015 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshot returns deleted ids in hasMany call
2 participants