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

Unset relation when null (singular) or empty array (plural) #67

Merged
merged 2 commits into from
Nov 18, 2019

Conversation

JaZo
Copy link
Member

@JaZo JaZo commented Nov 14, 2019

Description

You can now unset a relation using the ItemHydrator by passing null (singular relation) or [] (plural relation).

Motivation and context

The ItemHydrator currently hydrates the relation with an item with id null for singular relations or no relation at all for plural relations.

Closes: #66

How has this been tested?

Tested with new unit tests.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

@JaZo JaZo force-pushed the feature/issue-66-unset-relation-using-itemhydrator branch from b720570 to 644bd9f Compare November 17, 2019 12:29
@JaZo JaZo merged commit d83ca25 into master Nov 18, 2019
@JaZo JaZo deleted the feature/issue-66-unset-relation-using-itemhydrator branch November 18, 2019 08:30
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.

How to set a relation to "null"?
2 participants