Skip to content

Introduce relationship.hasData - #2936

Merged
igorT merged 1 commit into
warp-drive-data:masterfrom
wecc:relationship-has-data
Mar 25, 2015
Merged

Introduce relationship.hasData#2936
igorT merged 1 commit into
warp-drive-data:masterfrom
wecc:relationship-has-data

Conversation

@wecc

@wecc wecc commented Mar 24, 2015

Copy link
Copy Markdown
Contributor

This is a first stab at making relationships aware if data exists for the relationship or not.

There's currently no way of knowing if the contents of a relationship is unknown, empty or set just by looking at a snapshot (which is what serializers must do). This PR lays the groundwork of having snapshots returning an unknown state for calls to .belongsTo() and .hasMany() when we don't know the contents of the relationship yet.

This should most likely be reviewed and thought through at least once before we merge it.

igorT added a commit that referenced this pull request Mar 25, 2015
@igorT
igorT merged commit e463719 into warp-drive-data:master Mar 25, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The true argument is not used within the relationships setHasData method ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pangratz this was intentional, "future proofing"... we should probably add the parameter to setHasData() method though, even if we currently only support setting it to true.

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.

3 participants